]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/atomic: make 32-bit atomic64_t unsigned 1924/head 1925/head
authorSage Weil <sage@inktank.com>
Thu, 5 Jun 2014 17:43:16 +0000 (10:43 -0700)
committerSage Weil <sage@inktank.com>
Thu, 5 Jun 2014 18:59:31 +0000 (11:59 -0700)
This fixes

In file included from test/perf_counters.cc:19:0:
./common/perf_counters.h: In member function ‘std::pair PerfCounters::perf_counter_data_any_d::read_avg() const’:
warning: ./common/perf_counters.h:156:36: comparison between signed and unsigned integer expressions [-Wsign-compare]
} while (avgcount2.read() != count);
^

Signed-off-by: Sage Weil <sage@inktank.com>
src/include/atomic.h

index 55f7290ac8757e09d8d623adcbb559fa7bb78184..88c9bfd3871e1063741bcdeb815361306cf4a8e5 100644 (file)
@@ -122,7 +122,7 @@ namespace ceph {
 #if SIZEOF_AO_T == 8
   typedef atomic_t atomic64_t;
 #else
-  typedef atomic_spinlock_t<long long> atomic64_t;
+  typedef atomic_spinlock_t<unsigned long long> atomic64_t;
 #endif
 
 }