[media] dtv-core.rst: move DTV ringbuffer notes to kAPI doc

Instead of keeping those notes at the file on a non-structured
way, move them to dtv-core.rst, using the proper ReST tags.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Mauro Carvalho Chehab
2016-08-29 08:39:32 -03:00
parent ff54c19d8e
commit b6df512a9f
2 changed files with 36 additions and 30 deletions

View File

@@ -66,34 +66,6 @@ extern void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data,
*
* @rbuf: pointer to struct dvb_ringbuffer
*/
/*
* Notes:
* ------
* (1) For performance reasons read and write routines don't check buffer sizes
* and/or number of bytes free/available. This has to be done before these
* routines are called. For example:
*
* *** write @buflen: bytes ***
* free = dvb_ringbuffer_free(rbuf);
* if (free >= buflen)
* count = dvb_ringbuffer_write(rbuf, buffer, buflen);
* else
* ...
*
* *** read min. 1000, max. @bufsize: bytes ***
* avail = dvb_ringbuffer_avail(rbuf);
* if (avail >= 1000)
* count = dvb_ringbuffer_read(rbuf, buffer, min(avail, bufsize));
* else
* ...
*
* (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.
* Resetting the buffer counts as a read and write operation.
* Two or more writers must be locked against each other.
*/
extern int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf);
/**