Changeset 9622 in vbox
- Timestamp:
- Jun 11, 2008 5:11:39 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpuset.h
r9579 r9622 189 189 * @param pSet Pointer to the set. 190 190 */ 191 DECLINLINE( RTCPUID) RTCpuSetCount(PRTCPUSET pSet)192 { 193 RTCPUIDcCpus = 0;191 DECLINLINE(int) RTCpuSetCount(PCRTCPUSET pSet) 192 { 193 int cCpus = 0; 194 194 RTCPUID iCpu = 64; 195 195 while (iCpu-- > 0) … … 200 200 201 201 202 /** 203 * Get the highest set index. 204 * 205 * @returns The higest set index, -1 if all bits are clear. 206 * @param pSet Pointer to the set. 207 */ 208 DECLINLINE(int) RTCpuLastIndex(PCRTCPUSET pSet) 209 { 210 /* There are more efficient ways to do this in asm.h... */ 211 int iCpu = RTCPUSET_MAX_CPUS; 212 while (iCpu-- > 0) 213 if (*pSet & RT_BIT_64(iCpu)) 214 return iCpu; 215 return iCpu; 216 } 217 218 202 219 /** @} */ 203 220
Note:
See TracChangeset
for help on using the changeset viewer.