From 3196cd19dce1408d892214790aff7fda20558829 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 12 May 2014 16:14:31 -0700 Subject: [PATCH] chore(util/thread): add atomic_uint type Signed-off-by: Leonardo de Moura --- src/util/thread.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/thread.h b/src/util/thread.h index 22440cbfa..3b3229729 100644 --- a/src/util/thread.h +++ b/src/util/thread.h @@ -22,6 +22,7 @@ using std::recursive_mutex; using std::atomic; using std::atomic_bool; using std::atomic_ushort; +using std::atomic_uint; using std::atomic_uchar; using std::condition_variable; using std::lock_guard; @@ -52,6 +53,7 @@ namespace this_thread = boost::this_thread; typedef atomic atomic_bool; typedef atomic atomic_ushort; typedef atomic atomic_uchar; +typedef atomic atomic_uint; template T atomic_load(atomic const * a) { return a->load(); } template T atomic_fetch_add_explicit(atomic * a, T v, boost::memory_order mo) { return a->fetch_add(v, mo); } template T atomic_fetch_sub_explicit(atomic * a, T v, boost::memory_order mo) { return a->fetch_sub(v, mo); } @@ -97,6 +99,7 @@ public: typedef atomic atomic_ushort; typedef atomic atomic_uchar; typedef atomic atomic_bool; +typedef atomic atomic_uint; class thread { public: thread() {}