From c0d0364c030688aa8bfe4ad8dcaa2cffed8c0d04 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 May 2009 16:04:14 +0000 Subject: Strip trailing whitespace. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@1999 a436a847-0d15-0410-975c-d299462d15a1 --- raul/SRSWQueue.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'raul/SRSWQueue.hpp') diff --git a/raul/SRSWQueue.hpp b/raul/SRSWQueue.hpp index 572da2e..f33ebae 100644 --- a/raul/SRSWQueue.hpp +++ b/raul/SRSWQueue.hpp @@ -1,15 +1,15 @@ /* This file is part of Raul. * Copyright (C) 2007 Dave Robillard - * + * * Raul is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * Raul is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,7 +28,7 @@ namespace Raul { /** Realtime-safe single-reader single-writer queue (aka lock-free ringbuffer) * - * Implemented as a dequeue in a fixed array. This is read/write thread-safe, + * Implemented as a dequeue in a fixed array. This is read/write thread-safe, * pushing and popping may occur simultaneously by seperate threads, but * the push and pop operations themselves are not thread-safe (ie. there can * be at most 1 read and at most 1 writer thread). @@ -41,24 +41,24 @@ class SRSWQueue : boost::noncopyable public: SRSWQueue(size_t size); ~SRSWQueue(); - + // 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; inline T& front() const; inline void pop(); - + private: AtomicInt _front; ///< Index to front of queue (circular) AtomicInt _back; ///< Index to back of queue (one past last element) (circular) -- cgit v1.2.1