NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Producer< T, SIZE > Class Template Reference

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

Detailed Description

template<typename T, unsigned SIZE>
class Producer< T, SIZE >

Producer with fixed items.

Constructor & Destructor Documentation

template<typename T, unsigned SIZE>
Producer< T, SIZE >::Producer ( Consumer< T, SIZE > *  consumer = 0,
unsigned  nq = 0 
)
inline

Member Function Documentation

template<typename T, unsigned SIZE>
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.

template<typename T, unsigned SIZE>
unsigned Producer< T, SIZE >::sm ( )
inline

Member Data Documentation

template<typename T, unsigned SIZE>
Consumer<T, SIZE>* Producer< T, SIZE >::_consumer
protected
template<typename T, unsigned SIZE>
bool Producer< T, SIZE >::_dropping
protected
template<typename T, unsigned SIZE>
KernelSemaphore Producer< T, SIZE >::_sem
protected

The documentation for this class was generated from the following file: