summaryrefslogtreecommitdiff
path: root/csu/tst-atomic.c
diff options
context:
space:
mode:
Diffstat (limited to 'csu/tst-atomic.c')
-rw-r--r--csu/tst-atomic.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/csu/tst-atomic.c b/csu/tst-atomic.c
index 6104466739..cb6b6ba3d4 100644
--- a/csu/tst-atomic.c
+++ b/csu/tst-atomic.c
@@ -1,5 +1,5 @@
/* Tests for atomic.h macros.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -130,6 +130,12 @@ do_test (void)
ret = 1;
}
+ if (atomic_increment_val (&mem) != 1)
+ {
+ puts ("atomic_increment_val test failed");
+ ret = 1;
+ }
+
mem = 0;
if (atomic_increment_and_test (&mem)
|| mem != 1)
@@ -162,6 +168,12 @@ do_test (void)
ret = 1;
}
+ if (atomic_decrement_val (&mem) != 15)
+ {
+ puts ("atomic_decrement_val test failed");
+ ret = 1;
+ }
+
mem = 0;
if (atomic_decrement_and_test (&mem)
|| mem != -1)