Ignore:
Timestamp:
Jun 4, 2007, 3:50:19 AM (18 years ago)
Author:
Brendan Oakley
Message:

Muted some compile warnings, moved atomic_dec_and_test from compat_22.h to atomic.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/include/asm/atomic.h

    r32 r118  
    2424  parm [eax];
    2525
    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 */
     35static 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
    2743extern int atomic_add_negative(int i, volatile atomic_t *v);
    2844
Note: See TracChangeset for help on using the changeset viewer.