Single writer, multiple reader fifo.
More...
#include <gr_buffer.h>
List of all members.
Detailed Description
Single writer, multiple reader fifo.
Constructor & Destructor Documentation
virtual gr_buffer::~gr_buffer |
( |
|
) |
[virtual] |
Member Function Documentation
int gr_buffer::bufsize |
( |
|
) |
const [inline] |
return size of this buffer in items
References d_bufsize.
bool gr_buffer::done |
( |
|
) |
const [inline] |
Return the block that writes to this buffer.
gruel::mutex* gr_buffer::mutex |
( |
|
) |
[inline] |
size_t gr_buffer::nreaders |
( |
|
) |
const [inline] |
void gr_buffer::set_done |
( |
bool |
done |
) |
|
int gr_buffer::space_available |
( |
|
) |
|
return number of items worth of space available for writing
void gr_buffer::update_write_pointer |
( |
int |
nitems |
) |
|
tell buffer that we wrote nitems
into it
void* gr_buffer::write_pointer |
( |
|
) |
|
return pointer to write buffer.
The return value points at space that can hold at least space_available() items.
Friends And Related Function Documentation
Create a new gr_buffer_reader and attach it to buffer buf
.
- Parameters:
-
| buf | is the buffer the gr_buffer_reader reads from. |
| nzero_preload | -- number of zero items to "preload" into buffer. |
| link | is the block that reads from the buffer using this gr_buffer_reader. |
Allocate a buffer that holds at least nitems
of size sizeof_item
.
The total size of the buffer will be rounded up to a system dependent boundary. This is typically the system page size, but under MS windows is 64KB.
- Parameters:
-
| nitems | is the minimum number of items the buffer will hold. |
| sizeof_item | is the size of an item in bytes. |
| link | is the block that writes to this buffer. |
Member Data Documentation
The documentation for this class was generated from the following file: