[CRIU] [PATCH] zdtm/atomic: atomic_inc should return the old value
Andrey Vagin
avagin at openvz.org
Tue Apr 26 17:26:28 PDT 2016
From: Andrei Vagin <avagin+ppc at gmail.com>
00:24:30.269: 44: ERR: test.c:208: Test exited on unexpected signal
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
test/zdtm/lib/arch/ppc64/include/asm/atomic.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/zdtm/lib/arch/ppc64/include/asm/atomic.h b/test/zdtm/lib/arch/ppc64/include/asm/atomic.h
index 9463006..bd14cc0 100644
--- a/test/zdtm/lib/arch/ppc64/include/asm/atomic.h
+++ b/test/zdtm/lib/arch/ppc64/include/asm/atomic.h
@@ -47,7 +47,7 @@ ATOMIC_OP(sub, subf)
#undef ATOMIC_OP
-static __inline__ int atomic_inc(atomic_t *v)
+static __inline__ int atomic_inc_return(atomic_t *v)
{
int t;
@@ -65,6 +65,11 @@ static __inline__ int atomic_inc(atomic_t *v)
return t;
}
+static __inline__ int atomic_inc(atomic_t *v)
+{
+ return atomic_inc_return(v) - 1;
+}
+
static __inline__ void atomic_dec(atomic_t *v)
{
int t;
--
2.5.5
More information about the CRIU
mailing list