Changeset 118 for GPL/trunk/include/asm/atomic.h
- Timestamp:
- Jun 4, 2007, 3:50:19 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/include/asm/atomic.h
r32 r118 24 24 parm [eax]; 25 25 26 int atomic_dec_and_test(volatile atomic_t *v); 26 /** 27 * atomic_dec_and_test - decrement and test 28 * @v: pointer of type atomic_t 29 * 30 * Atomically decrements @v by 1 and 31 * returns true if the result is 0, or false for all other 32 * cases. Note that the guaranteed 33 * useful range of an atomic_t is only 24 bits. 34 */ 35 static inline int atomic_dec_and_test(volatile atomic_t *v) 36 { 37 atomic_dec(v); 38 if (v->counter == 0) 39 return 1; 40 return 0; 41 } 42 27 43 extern int atomic_add_negative(int i, volatile atomic_t *v); 28 44
Note:
See TracChangeset
for help on using the changeset viewer.