S3FC project page | S3FC home page |
#include <s3_inplace_fifo_base.h>
Inheritance diagram for s3_inplace_fifo_base:
Public Methods | |
void | push (const T &t) |
Insert data at candidate production slot (queue head). More... | |
virtual T | pop () |
Remove and return data at candidate consumption slot (queue tail). More... | |
virtual T * | open_input ()=0 |
Acquire the next available production slot. More... | |
virtual T * | nbl_open_input ()=0 |
Non-blocking version of open_input() . More... | |
virtual void | close_input (const T *t=0)=0 |
Close a producer slot, making it available for consumption. More... | |
virtual T * | open_output ()=0 |
Acquire the next available consumption slot. More... | |
virtual T * | nbl_open_output ()=0 |
Non-blocking version of open_output() . More... | |
virtual void | close_output (const T *t=0)=0 |
Close a previously acquired consumer slot, freeing it. More... |
It extends the interface of the s3_fifo_base
to include calls to open and close producer and consumer slots. Templated on the type of objects stored in the queue. Each slot can only be acquired once for production and once for consumption. Slots are acquired for consumption in the same order the were acquired for production.
Definition at line 51 of file s3_inplace_fifo_base.h.
|
Close a producer slot, making it available for consumption.
This must be called when production has finished, to make this slot available. In a queue capable of multiple concurrent producers, the pointer obtained from the corresponding
Implemented in s3_fifo_queue. Referenced by s3_inplace_fifo_base< s3_message >::push. |
|
Close a previously acquired consumer slot, freeing it.
This must be called when consumption has finished, to make this slot available. In a queue capable of multiple concurrent consumers. the pointer obtained from the corresponding
Implemented in s3_fifo_queue. Referenced by s3_inplace_fifo_base< s3_message >::pop. |
|
Non-blocking version of Perform the following as a single atomic operation: if ! empty(): return open_input() else: return 0 Implemented in s3_fifo_queue. |
|
Non-blocking version of Perform the following as a single atomic operation: if ! full(): return open_output() else: return 0 Implemented in s3_fifo_queue. |
|
Acquire the next available production slot.
A pointer to an object, type
Implemented in s3_fifo_queue. Referenced by s3_inplace_fifo_base< s3_message >::push. |
|
Acquire the next available consumption slot.
A pointer to an object, type
Implemented in s3_fifo_queue. Referenced by s3_inplace_fifo_base< s3_message >::pop. |
|
Remove and return data at candidate consumption slot (queue tail).
This is implemented using the assignment operator to extract the object from the queue and the copy constructor to return it.
Implements s3_fifo_base. Reimplemented in s3_inplace_fifo_mux::stub_queue. Definition at line 74 of file s3_inplace_fifo_base.h. Referenced by s3_post_office::main_loop. |
|
Insert data at candidate production slot (queue head).
This is implemented using the assignment operator,
Implements s3_fifo_base. Reimplemented in s3_inplace_fifo_mux::stub_queue. Definition at line 60 of file s3_inplace_fifo_base.h. Referenced by s3_post_office::main_loop. |
Send comments to: s3fc@stonethree.com |
|