Whamcloud - gitweb
fix typo.
authorshadow <shadow>
Thu, 17 Apr 2008 12:28:50 +0000 (12:28 +0000)
committershadow <shadow>
Thu, 17 Apr 2008 12:28:50 +0000 (12:28 +0000)
i=nikita
i=johann

lustre/include/liblustre.h

index a96bc33..4a89f50 100644 (file)
@@ -706,7 +706,7 @@ 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_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)