Re: G4 vs G3
Re: G4 vs G3
- Subject: Re: G4 vs G3
- From: Alexander Griekspoor <email@hidden>
- Date: Wed, 11 Jun 2003 13:30:40 +0200
Hi Rolf,
That's what I was looking for! Thanks!
On second thoughts, I would like to know how to get the processor speed
as well ;-)
And could you help me on my way with my second question, how do I
inspect the headers of for instance mach/mach.h? Where do I find for
instance the possible values of gestaltReturnValues?
Again, many thanks in advance!
Alex
Rolf heeft op woensdag, 11 jun 2003 om 12:02 (Europe/Amsterdam) het
volgende geschreven:
Hi,
Try the following:
+(NSString *)processor {
SInt32 gestaltReturnValue;
NSString * result = @"";
if (!Gestalt(gestaltNativeCPUtype, &gestaltReturnValue)) {
switch (gestaltReturnValue) {
case gestaltCPU601 :
case gestaltCPU603 :
case gestaltCPU604 :
case gestaltCPU603e :
case gestaltCPU603ev :
case gestaltCPU750 :
case gestaltCPU604e :
case gestaltCPU604ev : { result = @"G3"; break; }
case gestaltCPUG4 :
case gestaltCPUG47450 : { result = @"G4"; break; }
default: {
if (gestaltReturnValue > gestaltCPUG47450) {
result = @"G4 or better";
} else {
result = [NSString stringWithFormat:@"Unknown"];
}
}
}
} else { // Failed
}
return result;
}
If you need to know th nr of Mhz and so forth send me a note.
/Rolf
11.06.2003 11:47:41, skrev Alexander Griekspoor <email@hidden>:
Hi There!
Does anyone know a simple call to find out which processor type (G3 or
G4, PPC970 ;-) the user has?
Ideally, I'm looking for something like MPProcessors() which returns
the number of processors the machine has. Then one more small
question.
It might be to simple for words, but for someone new to the UNIX
world,
is there a simple way to browse to the header files like mach/mach.h
and other c libraries?
Many thanks in advance!
Alexander Griekspoor
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
E-mail: email@hidden
Web: http://www.mekentosj.com
LabAssistant - Get your life organized!
http://www.mekentosj.com/labassistant
*********************************************************
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
E-mail: email@hidden
Web:
http://www.mekentosj.com
The requirements said: Windows 2000 or better.
So I got a Macintosh.
*********************************************************
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.