Changeset 52582 in vbox
- Timestamp:
- Sep 3, 2014 12:50:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpuset.h
r36262 r52582 71 71 72 72 /** 73 * ANDs the given CPU set with another. 74 * 75 * @returns pSet. 76 * @param pSet Pointer to the set. 77 * @param pAndMaskSet Pointer to the AND-mask set. 78 */ 79 DECLINLINE(PRTCPUSET) RTCpuSetAnd(PRTCPUSET pSet, PRTCPUSET pAndMaskSet) 80 { 81 unsigned i; 82 for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++) 83 ASMAtomicAndU64((volatile uint64_t *)&pSet->bmSet[i], pAndMaskSet->bmSet[i]); 84 return pSet; 85 } 86 87 88 /** 73 89 * Adds a CPU given by its identifier to the set. 74 90 * … … 185 201 for (i = 0; i < RT_ELEMENTS(pSet1->bmSet); i++) 186 202 if (pSet1->bmSet[i] != pSet2->bmSet[i]) 203 return false; 204 return true; 205 } 206 207 208 /** 209 * Checks if the CPU set is empty or not. 210 * 211 * @returns true / false accordingly. 212 * @param pSet Pointer to the set. 213 */ 214 DECLINLINE(bool) RTCpuSetIsEmpty(PRTCPUSET pSet) 215 { 216 unsigned i; 217 for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++) 218 if (pSet->bmSet[i]) 187 219 return false; 188 220 return true;
Note:
See TracChangeset
for help on using the changeset viewer.