From: Dustin M. <du...@se...> - 2001-08-28 03:27:23
|
There seem to be a couple operations missing in atomic.h. The following is a patch to add the 'atomic_add_and_test' and 'atomic_inc_and_test' to the asm/atomic.h header. Index: atomic.h =================================================================== RCS file: /home/CVS-ext/mgate/software/core/kernel/include/asm-sh/atomic.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- atomic.h 2001/07/23 17:52:34 1.1.1.2 +++ atomic.h 2001/08/28 03:15:36 1.2 @@ -71,6 +71,8 @@ #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) +#define atomic_add_and_test(i,v) (atomic_add_return((i), (v)) == 0) +#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) #define atomic_inc(v) atomic_add(1,(v)) #define atomic_dec(v) atomic_sub(1,(v)) |