summaryrefslogtreecommitdiffstats
path: root/raul/SRSWQueue.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-18 15:52:39 +0000
committerDavid Robillard <d@drobilla.net>2011-05-18 15:52:39 +0000
commit7bd4febfdb799cd359a380d23640654f476dadae (patch)
tree7acf0526548382e3768b45628a47f094120b7724 /raul/SRSWQueue.hpp
parent3a1a098d7d41468a74862777d3085f537fb6b894 (diff)
downloadraul-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/SRSWQueue.hpp')
-rw-r--r--raul/SRSWQueue.hpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/raul/SRSWQueue.hpp b/raul/SRSWQueue.hpp
index d87b431..80758d2 100644
--- a/raul/SRSWQueue.hpp
+++ b/raul/SRSWQueue.hpp
@@ -26,7 +26,6 @@
namespace Raul {
-
/** Realtime-safe single-reader single-writer queue (aka lock-free ringbuffer)
*
* This is appropriate for a cross-thread queue of fixed size object. If you
@@ -51,13 +50,11 @@ public:
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;
@@ -71,7 +68,6 @@ private:
T* const _objects; ///< Fixed array containing queued elements
};
-
template<typename T>
SRSWQueue<T>::SRSWQueue(size_t size)
: _front(0)
@@ -82,14 +78,12 @@ SRSWQueue<T>::SRSWQueue(size_t size)
assert(size > 1);
}
-
template <typename T>
SRSWQueue<T>::~SRSWQueue()
{
delete[] _objects;
}
-
/** Return whether or not the queue is empty.
*/
template <typename T>
@@ -99,7 +93,6 @@ SRSWQueue<T>::empty() const
return (_back.get() == _front.get());
}
-
/** Return whether or not the queue is full.
*/
template <typename T>
@@ -109,7 +102,6 @@ SRSWQueue<T>::full() const
return (((_front.get() - _back.get() + _size) % _size) == 1);
}
-
/** Return the element at the front of the queue without removing it
*/
template <typename T>
@@ -119,7 +111,6 @@ SRSWQueue<T>::front() const
return _objects[_front.get()];
}
-
/** Push an item onto the back of the SRSWQueue - realtime-safe, not thread-safe.
*
* @returns true if @a elem was successfully pushed onto the queue,
@@ -139,7 +130,6 @@ SRSWQueue<T>::push(const T& elem)
}
}
-
/** Pop an item off the front of the queue - realtime-safe, not thread-safe.
*
* It is a fatal error to call pop() when the queue is empty.
@@ -156,7 +146,6 @@ SRSWQueue<T>::pop()
_front = (_front.get() + 1) % (_size);
}
-
} // namespace Raul
#endif // RAUL_SRSW_QUEUE_HPP