[ovs-dev] [PATCH v2 2/2] ovs-atomic: Remove atomic_{u,}int64_t

Simon Horman horms at verge.net.au
Wed May 14 07:19:35 UTC 2014


Some concern has been raised by Ben Pfaff that atomic_uint64_t may not
be portable. In particular on 32bit platforms that do not have atomic
64bit integers.

Now that there are no longer any users of atomic_uint64_t remove it
entirely. Also remove atomic_int64_t which has no users.

Cc: YAMAMOTO Takashi <yamamoto at valinux.co.jp>
Signed-off-by: Simon Horman <horms at verge.net.au>

v2
* As suggested by Ben Pfaff
  - Actually remove atomic_uint64_t and atomic_int64_t rather than
    just removing their test
---
 lib/ovs-atomic.h    | 4 ----
 tests/test-atomic.c | 2 --
 2 files changed, 6 deletions(-)

diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h
index 01ac8c4..c21b7ee 100644
--- a/lib/ovs-atomic.h
+++ b/lib/ovs-atomic.h
@@ -69,8 +69,6 @@
  *     int8_t                   atomic_int8_t      (*)
  *     int16_t                  atomic_int16_t     (*)
  *     int32_t                  atomic_int32_t     (*)
- *     uint64_t                 atomic_uint64_t    (*)
- *     int64_t                  atomic_int64_t     (*)
  *
  *     (*) Not specified by C11.
  *
@@ -296,12 +294,10 @@ typedef ATOMIC(uintptr_t)          atomic_uintptr_t;
 typedef ATOMIC(uint8_t)   atomic_uint8_t;
 typedef ATOMIC(uint16_t)  atomic_uint16_t;
 typedef ATOMIC(uint32_t)  atomic_uint32_t;
-typedef ATOMIC(uint64_t)  atomic_uint64_t;
 
 typedef ATOMIC(int8_t)    atomic_int8_t;
 typedef ATOMIC(int16_t)   atomic_int16_t;
 typedef ATOMIC(int32_t)   atomic_int32_t;
-typedef ATOMIC(int64_t)   atomic_int64_t;
 
 /* Reference count. */
 struct ovs_refcount {
diff --git a/tests/test-atomic.c b/tests/test-atomic.c
index b1a5d9d..24456d8 100644
--- a/tests/test-atomic.c
+++ b/tests/test-atomic.c
@@ -99,8 +99,6 @@ test_atomic_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
     TEST_ATOMIC_TYPE(atomic_int16_t, int16_t);
     TEST_ATOMIC_TYPE(atomic_uint32_t, uint32_t);
     TEST_ATOMIC_TYPE(atomic_int32_t, int32_t);
-    TEST_ATOMIC_TYPE(atomic_uint64_t, uint64_t);
-    TEST_ATOMIC_TYPE(atomic_int64_t, int64_t);
 
     test_atomic_flag();
 }
-- 
1.8.5.2




More information about the dev mailing list