From a90eec5c87af4dec9f8f45223cd228cb7ca674c6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 Jan 2013 03:35:17 +0000 Subject: Use C++11 atomics. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4916 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/PreProcessor.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/server/PreProcessor.hpp') diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp index 9b7fbd44..10563ee9 100644 --- a/src/server/PreProcessor.hpp +++ b/src/server/PreProcessor.hpp @@ -17,9 +17,10 @@ #ifndef INGEN_ENGINE_PREPROCESSOR_HPP #define INGEN_ENGINE_PREPROCESSOR_HPP +#include + #include -#include "raul/AtomicPtr.hpp" #include "raul/Semaphore.hpp" #include "raul/Thread.hpp" @@ -43,7 +44,7 @@ public: } /** Return true iff no events are enqueued. */ - inline bool empty() const { return !_head.get(); } + inline bool empty() const { return !_head.load(); } /** Enqueue an event. * This is safe to call from any non-realtime thread (it locks). @@ -61,11 +62,11 @@ protected: virtual void _run(); private: - Glib::Mutex _mutex; - Raul::Semaphore _sem; - Raul::AtomicPtr _head; - Raul::AtomicPtr _prepared_back; - Raul::AtomicPtr _tail; + Glib::Mutex _mutex; + Raul::Semaphore _sem; + std::atomic _head; + std::atomic _prepared_back; + std::atomic _tail; }; } // namespace Server -- cgit v1.2.1