Changeset 10418 in vbox
- Timestamp:
- Jul 9, 2008 1:45:07 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mp.h
r9611 r10418 56 56 * Converts a CPU identifier to a CPU set index. 57 57 * 58 * This may or may not validate the pre cense of the CPU.58 * This may or may not validate the presence of the CPU. 59 59 * 60 60 * @returns The CPU set index on success, -1 on failure. … … 66 66 * Converts a CPU set index to a a CPU identifier. 67 67 * 68 * This may or may not validate the pre cense of the CPU, so, use68 * This may or may not validate the presence of the CPU, so, use 69 69 * RTMpIsCpuPossible for that. 70 70 * … … 131 131 */ 132 132 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu); 133 134 /** 135 * Get the current CPU speed (in Mhz) of a CPU which is currently online. 136 * 137 * @returns CPU speed if CPU id is valid, 0 otherwise. 138 */ 139 RTDECL(uint32_t) RTMpGetCurFrequency(RTCPUID idCpu); 140 141 142 /** 143 * Get the maximum CPU speed (in Mhz) of a CPU which is currently online. 144 * 145 * @returns CPU speed if CPU id is valid, 0 otherwise. 146 */ 147 RTDECL(uint32_t) RTMpGetMaxFrequency(RTCPUID idCpu); 133 148 134 149 -
trunk/src/VBox/Runtime/Makefile.kmk
r10237 r10418 278 278 generic/semnoint-generic.cpp \ 279 279 generic/semsrw-generic.cpp \ 280 generic/RTMpGetCurFrequency-generic.cpp \ 281 generic/RTMpGetMaxFrequency-generic.cpp \ 280 282 nt/RTErrConvertFromNtStatus.cpp \ 281 283 r3/posix/env-posix.cpp \ … … 317 319 generic/utf16locale-generic.cpp \ 318 320 generic/uuid-generic.cpp \ 321 generic/RTMpGetCurFrequency-generic.cpp \ 322 generic/RTMpGetMaxFrequency-generic.cpp \ 319 323 r3/linux/sched-linux.cpp \ 320 324 r3/linux/time-linux.cpp \ … … 368 372 generic/utf16locale-generic.cpp \ 369 373 generic/uuid-generic.cpp \ 374 generic/RTMpGetCurFrequency-generic.cpp \ 375 generic/RTMpGetMaxFrequency-generic.cpp \ 370 376 os2/RTErrConvertFromOS2.cpp \ 371 377 r3/os2/filelock-os2.cpp \ … … 405 411 generic/utf16locale-generic.cpp \ 406 412 generic/uuid-generic.cpp\ 413 generic/RTMpGetCurFrequency-generic.cpp \ 414 generic/RTMpGetMaxFrequency-generic.cpp \ 407 415 r3/darwin/alloc-darwin.cpp \ 408 416 r3/darwin/filelock-darwin.cpp \ … … 440 448 generic/utf16locale-generic.cpp \ 441 449 generic/uuid-generic.cpp \ 450 generic/RTMpGetCurFrequency-generic.cpp \ 451 generic/RTMpGetMaxFrequency-generic.cpp \ 442 452 r3/freebsd/alloc-freebsd.cpp \ 443 453 r3/posix/dir-posix.cpp \ … … 476 486 generic/utf16locale-generic.cpp \ 477 487 generic/uuid-generic.cpp \ 488 generic/RTMpGetCurFrequency-generic.cpp \ 489 generic/RTMpGetMaxFrequency-generic.cpp \ 478 490 r3/posix/dir-posix.cpp \ 479 491 r3/posix/env-posix.cpp \ -
trunk/src/VBox/Runtime/generic/RTMpGetCurFrequency-generic.cpp
r10409 r10418 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - Multiprocessor, Generic RTMpGet OnlineCount.3 * IPRT - Multiprocessor, Generic RTMpGetCurFrequency. 4 4 */ 5 5 … … 37 37 38 38 39 RTDECL(RTCPUID) RTMpGet OnlineCount(void)39 RTDECL(RTCPUID) RTMpGetCurFrequency(void) 40 40 { 41 RTCPUSET Set; 42 RTMpGetOnlineSet(&Set); 43 return RTCpuSetCount(&Set); 41 /** @note this is a generic stub which returns "unknown". */ 42 return 0; 44 43 } 45 44 -
trunk/src/VBox/Runtime/generic/RTMpGetMaxFrequency-generic.cpp
r10409 r10418 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - Multiprocessor, Generic RTMpGet OnlineCount.3 * IPRT - Multiprocessor, Generic RTMpGetMaxFrequency. 4 4 */ 5 5 … … 37 37 38 38 39 RTDECL(RTCPUID) RTMpGet OnlineCount(void)39 RTDECL(RTCPUID) RTMpGetMaxFrequency(void) 40 40 { 41 RTCPUSET Set; 42 RTMpGetOnlineSet(&Set); 43 return RTCpuSetCount(&Set); 41 /** @note this is a generic stub which returns "unknown". */ 42 return 0; 44 43 } 45 44
Note:
See TracChangeset
for help on using the changeset viewer.