diff options
author | David Robillard <d@drobilla.net> | 2011-05-18 15:52:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-18 15:52:39 +0000 |
commit | 7bd4febfdb799cd359a380d23640654f476dadae (patch) | |
tree | 7acf0526548382e3768b45628a47f094120b7724 /raul/SRMWQueue.hpp | |
parent | 3a1a098d7d41468a74862777d3085f537fb6b894 (diff) | |
download | raul-7bd4febfdb799cd359a380d23640654f476dadae.tar.gz raul-7bd4febfdb799cd359a380d23640654f476dadae.tar.bz2 raul-7bd4febfdb799cd359a380d23640654f476dadae.zip |
Strip double blank lines.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@3279 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/SRMWQueue.hpp')
-rw-r--r-- | raul/SRMWQueue.hpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/raul/SRMWQueue.hpp b/raul/SRMWQueue.hpp index b1d5ff2..6680103 100644 --- a/raul/SRMWQueue.hpp +++ b/raul/SRMWQueue.hpp @@ -28,7 +28,6 @@ namespace Raul { - /** Realtime-safe single-reader multi-writer queue (aka lock-free ringbuffer) * * Implemented as a dequeue in a fixed array. Both push and pop are realtime @@ -57,18 +56,15 @@ public: explicit SRMWQueue(size_t size); ~SRMWQueue(); - // Any thread: inline size_t capacity() const { return _size-1; } - // Write thread(s): inline bool full() const; inline bool push(const T& obj); - // Read thread: inline bool empty() const; @@ -89,7 +85,6 @@ private: AtomicInt* const _valid; ///< Parallel array to _objects, whether loc is written or not }; - template<typename T> SRMWQueue<T>::SRMWQueue(size_t size) : _front(0) @@ -108,14 +103,12 @@ SRMWQueue<T>::SRMWQueue(size_t size) } } - template <typename T> SRMWQueue<T>::~SRMWQueue() { free(_objects); } - /** Return whether the queue is full. * * Write thread(s) only. @@ -127,7 +120,6 @@ SRMWQueue<T>::full() const return (_write_space.get() <= 0); } - /** Push an item onto the back of the SRMWQueue - realtime-safe, not thread-safe. * * Write thread(s) only. @@ -169,7 +161,6 @@ SRMWQueue<T>::push(const T& elem) } } - /** Return whether the queue is empty. * * Read thread only. @@ -181,7 +172,6 @@ SRMWQueue<T>::empty() const return (_valid[_front].get() == 0); } - /** Return the element at the front of the queue without removing it. * * It is a fatal error to call front() when the queue is empty. @@ -194,7 +184,6 @@ SRMWQueue<T>::front() const return _objects[_front]; } - /** Pop an item off the front of the queue - realtime-safe, NOT thread-safe. * * It is a fatal error to call pop() if the queue is empty. @@ -217,7 +206,6 @@ SRMWQueue<T>::pop() ++_write_space; } - } // namespace Raul #endif // RAUL_SRMW_QUEUE_HPP |