X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Fliblustre.h;h=0fbd5bdd32d6349754ea52d9d85a89bb80b2912a;hp=feff186b32ab94c904cd0258a74f943f4977341c;hb=a9c31485993bcaa19608bd1333170fc14330c87c;hpb=b8b72c06c2c20ee7bca1e72e95b4ff941de313f0 diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index feff186..0fbd5bd 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -735,6 +735,8 @@ typedef struct { volatile int counter; } atomic_t; #define atomic_inc(a) (((a)->counter)++) #define atomic_dec(a) do { (a)->counter--; } while (0) #define atomic_add(b,a) do {(a)->counter += b;} while (0) +#define atomic_add_return(n,a) ((a)->counter = n) +#define atomic_inc_return(a) atomic_add_return(1,a) #define atomic_sub(b,a) do {(a)->counter -= b;} while (0) #define atomic_sub_return(n,a) ((a)->counter -= n) #define atomic_dec_return(a) atomic_sub_return(1,a)