Re: G4 vs G3
Re: G4 vs G3
- Subject: Re: G4 vs G3
- From: Rolf <email@hidden>
- Date: Wed, 11 Jun 2003 12:02:57 +0200
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.
_______________________________________________
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.
References: | |
| >G4 vs G3 (From: Alexander Griekspoor <email@hidden>) |