- Timestamp:
- Feb 23, 2007 4:54:37 PM (18 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r1047 r1049 4065 4065 static SUPGIPMODE supdrvGipDeterminTscMode(void) 4066 4066 { 4067 #ifndef USE_NEW_OS_INTERFACE 4067 4068 if (supdrvOSGetCPUCount() > 1) 4068 4069 { … … 4084 4085 } 4085 4086 } 4087 #endif 4086 4088 return SUPGIPMODE_SYNC_TSC; 4087 4089 } -
trunk/src/VBox/HostDrivers/Support/win32/SUPDrv-win32.cpp
r1027 r1049 1076 1076 1077 1077 1078 /** 1079 * Get the current CPU count. 1080 * @returns Number of cpus. 1081 */ 1082 unsigned VBOXCALL supdrvOSGetCPUCount(void) 1083 { 1084 KAFFINITY Mask = KeQueryActiveProcessors(); 1085 unsigned cCpus = 0; 1086 unsigned iBit; 1087 for (iBit = 0; iBit < sizeof(Mask) * 8; iBit++) 1088 if (Mask & (1 << iBit)) 1089 cCpus++; 1090 if (cCpus == 0) /* paranoia */ 1091 cCpus = 1; 1092 return cCpus; 1093 } 1094 1078 1095 1079 1096 /**
Note:
See TracChangeset
for help on using the changeset viewer.