Producer with fixed items. More...
#include <consumer.h>
Public Member Functions | |
bool | produce (T &value) |
Put something in the buffer. | |
unsigned | sm () |
Producer (Consumer< T, SIZE > *consumer=0, unsigned nq=0) | |
Protected Attributes | |
Consumer< T, SIZE > * | _consumer |
KernelSemaphore | _sem |
bool | _dropping |
Producer with fixed items.
Producer< T, SIZE >::Producer | ( | Consumer< T, SIZE > * | consumer = 0 , |
|
unsigned | nq = 0 | |||
) | [inline] |
bool Producer< T, SIZE >::produce | ( | T & | value | ) | [inline] |
Put something in the buffer.
Please note that this function is not locked, thus only a single producer should do the access at the very same time.
unsigned Producer< T, SIZE >::sm | ( | ) | [inline] |
KernelSemaphore Producer< T, SIZE >::_sem [protected] |