Changeset 14246 in vbox for trunk/include
- Timestamp:
- Nov 17, 2008 11:03:40 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39388
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r14073 r14246 3340 3340 3341 3341 /** 3342 * Atomically exchanges and subtracts to an unsigned 32-bit value, ordered. 3343 * 3344 * @returns The old value. 3345 * @param pu32 Pointer to the value. 3346 * @param u32 Number to subtract. 3347 */ 3348 DECLINLINE(uint32_t) ASMAtomicSubU32(int32_t volatile *pi32, uint32_t u32) 3349 { 3350 return ASMAtomicAddU32((uint32_t volatile *)pi32, (uint32_t)-(int32_t)u32); 3351 } 3352 3353 3354 /** 3355 * Atomically exchanges and subtracts to a signed 32-bit value, ordered. 3356 * 3357 * @returns The old value. 3358 * @param pi32 Pointer to the value. 3359 * @param i32 Number to subtract. 3360 */ 3361 DECLINLINE(int32_t) ASMAtomicSubS32(int32_t volatile *pi32, int32_t i32) 3362 { 3363 return (int32_t)ASMAtomicAddU32((uint32_t volatile *)pi32, (uint32_t)-i32); 3364 } 3365 3366 3367 /** 3342 3368 * Atomically increment a 32-bit value, ordered. 3343 3369 *
Note:
See TracChangeset
for help on using the changeset viewer.