Changeset 13836 in vbox for trunk/src/VBox/Main/include/AutoLock.h
- Timestamp:
- Nov 5, 2008 2:42:54 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/AutoLock.h
r13580 r13836 1115 1115 1116 1116 size_t i = 0; 1117 while (i < ELEMENTS (mOps))1117 while (i < RT_ELEMENTS (mOps)) 1118 1118 if (mOps [i]) 1119 1119 mOps [i ++]->lock(); … … 1132 1132 AssertReturnVoid (mIsLocked); 1133 1133 1134 AssertReturnVoid ( ELEMENTS (mOps) > 0);1135 size_t i = ELEMENTS (mOps);1134 AssertReturnVoid (RT_ELEMENTS (mOps) > 0); 1135 size_t i = RT_ELEMENTS (mOps); 1136 1136 do 1137 1137 if (mOps [-- i]) … … 1247 1247 { 1248 1248 size_t i = 0; 1249 while (i < ELEMENTS (mLocks))1249 while (i < RT_ELEMENTS (mLocks)) 1250 1250 mLocks [i ++].lock(); 1251 1251 } … … 1257 1257 void unlock() 1258 1258 { 1259 AssertReturnVoid ( ELEMENTS (mLocks) > 0);1260 size_t i = ELEMENTS (mLocks);1259 AssertReturnVoid (RT_ELEMENTS (mLocks) > 0); 1260 size_t i = RT_ELEMENTS (mLocks); 1261 1261 do 1262 1262 mLocks [-- i].unlock(); … … 1270 1270 void leave() 1271 1271 { 1272 AssertReturnVoid ( ELEMENTS (mLocks) > 0);1273 size_t i = ELEMENTS (mLocks);1272 AssertReturnVoid (RT_ELEMENTS (mLocks) > 0); 1273 size_t i = RT_ELEMENTS (mLocks); 1274 1274 do 1275 1275 mLocks [-- i].leave(); … … 1283 1283 void maybeLeave() 1284 1284 { 1285 AssertReturnVoid ( ELEMENTS (mLocks) > 0);1286 size_t i = ELEMENTS (mLocks);1285 AssertReturnVoid (RT_ELEMENTS (mLocks) > 0); 1286 size_t i = RT_ELEMENTS (mLocks); 1287 1287 do 1288 1288 mLocks [-- i].maybeLeave(); … … 1297 1297 { 1298 1298 size_t i = 0; 1299 while (i < ELEMENTS (mLocks))1299 while (i < RT_ELEMENTS (mLocks)) 1300 1300 mLocks [i ++].maybeEnter(); 1301 1301 } … … 1308 1308 { 1309 1309 size_t i = 0; 1310 while (i < ELEMENTS (mLocks))1310 while (i < RT_ELEMENTS (mLocks)) 1311 1311 mLocks [i ++].enter(); 1312 1312 }
Note:
See TracChangeset
for help on using the changeset viewer.