| | 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 | /** |
|---|