vserver 2.0 rc7
[linux-2.6.git] / drivers / media / dvb / dvb-core / dvb_ringbuffer.h
index c1ffa27..d18e9c4 100644 (file)
@@ -2,9 +2,9 @@
  *
  * dvb_ringbuffer.h: ring buffer implementation for the dvb driver
  *
- * Copyright (C) 2003 Oliver Endriss 
+ * Copyright (C) 2003 Oliver Endriss
  * Copyright (C) 2004 Andrew de Quincey
- * 
+ *
  * based on code originally found in av7110.c & dvb_ci.c:
  * Copyright (C) 1999-2003 Ralph Metzler & Marcus Metzler
  *                         for convergence integrated media GmbH
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; either version 2.1
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program 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 Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -52,7 +52,7 @@ struct dvb_ringbuffer {
 **
 **     *** write <buflen> bytes ***
 **     free = dvb_ringbuffer_free(rbuf);
-**     if (free >= buflen) 
+**     if (free >= buflen)
 **         count = dvb_ringbuffer_write(rbuf, buffer, buflen);
 **     else
 **         ...
@@ -64,7 +64,7 @@ struct dvb_ringbuffer {
 **     else
 **         ...
 **
-** (2) If there is exactly one reader and one writer, there is no need 
+** (2) If there is exactly one reader and one writer, there is no need
 **     to lock read or write operations.
 **     Two or more readers must be locked against each other.
 **     Flushing the buffer counts as a read operation.
@@ -99,13 +99,13 @@ extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf);
 /* advance read ptr by <num> bytes */
 #define DVB_RINGBUFFER_SKIP(rbuf,num)  \
                        (rbuf)->pread=((rbuf)->pread+(num))%(rbuf)->size
+
 /*
-** read <len> bytes from ring buffer into <buf> 
+** read <len> bytes from ring buffer into <buf>
 ** <usermem> specifies whether <buf> resides in user space
 ** returns number of bytes transferred or -EFAULT
 */
-extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, 
+extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,
                                    size_t len, int usermem);