S3FC project page | S3FC home page |
#include <s3_fifo_base.h>
Inheritance diagram for s3_subscribable_fifo:
Public Methods | |
void | subscribe_producer (const s3_semaphore &sem) |
Subscribe a producer and use the supplied semaphore to indicate a state change. More... | |
void | unsubscribe_producer (const s3_semaphore &sem) |
Unsubscribe a producer from the producer notification list. More... | |
bool | is_subscribed_producer (const s3_semaphore &sem) |
Test if the semaphore is already subscribed. More... | |
void | subscribe_consumer (const s3_semaphore &sem) |
Subscribe a consumer and use the supplied semaphore to indicate a state change. More... | |
void | unsubscribe_consumer (const s3_semaphore &sem) |
Unsubscribe a consumer from the consumer notification list. More... | |
bool | is_subscribed_consumer (const s3_semaphore &sem) |
Test if the semaphore is already subscribed. More... | |
void | notify_producers () const |
Notify all producers of a state change by post() 'ing on all the semaphores in the producer list. More... | |
void | notify_consumers () const |
Notify all consumers of a state change by post() 'ing on all the semaphores in the producer list. More... | |
Protected Attributes | |
std::list< s3_semaphore * > | producers |
List of subscribed producers. More... | |
std::list< s3_semaphore * > | consumers |
List of subscribed consumers. More... | |
s3_mutex | notification_lock |
Mutex protecting the notification mechanism. More... | |
Private Types | |
typedef std::list< s3_semaphore * >::const_iterator | T_ConstIterator |
typedef std::list< s3_semaphore * >::const_iterator | T_Iterator |
Definition at line 46 of file s3_fifo_base.h.
|
Definition at line 48 of file s3_fifo_base.h. Referenced by notify_consumers, and notify_producers. |
|
Definition at line 49 of file s3_fifo_base.h. |
|
Test if the semaphore is already subscribed.
Definition at line 132 of file s3_fifo_base.cc. References consumers, s3_mutex::lock, notification_lock, and s3_mutex::unlock. |
|
Test if the semaphore is already subscribed.
Definition at line 81 of file s3_fifo_base.cc. References s3_mutex::lock, notification_lock, producers, and s3_mutex::unlock. |
|
Notify all consumers of a state change by
Definition at line 157 of file s3_fifo_base.cc. References consumers, s3_mutex::lock, notification_lock, T_ConstIterator, and s3_mutex::unlock. Referenced by s3_spsc_fifo_queue::close_input, s3_fifo_queue< s3_txport_data< s3_message > >::close_input, and s3_growable_fifo_queue< s3_txport_event >::push. |
|
Notify all producers of a state change by
Definition at line 144 of file s3_fifo_base.cc. References s3_mutex::lock, notification_lock, producers, T_ConstIterator, and s3_mutex::unlock. Referenced by s3_spsc_fifo_queue::close_output, s3_fifo_queue< s3_txport_data< s3_message > >::close_output, and s3_growable_fifo_queue< s3_txport_event >::pop. |
|
Subscribe a consumer and use the supplied semaphore to indicate a state change.
A pointer to the supplied semaphore is stored and the caller should ensure that it stays valid for the existence of the queue. This fails, by throwing an
Definition at line 92 of file s3_fifo_base.cc. References consumers, s3_mutex::lock, notification_lock, and s3_mutex::unlock. Referenced by s3_post_office::main_loop. |
|
Subscribe a producer and use the supplied semaphore to indicate a state change.
A pointer to the supplied semaphore is stored and the caller should ensure that it stays valid for the existence of the queue. This fails, by throwing an
Definition at line 40 of file s3_fifo_base.cc. References s3_mutex::lock, notification_lock, producers, and s3_mutex::unlock. |
|
Unsubscribe a consumer from the consumer notification list.
This fails, by throwing an
Definition at line 112 of file s3_fifo_base.cc. References consumers, s3_mutex::lock, notification_lock, and s3_mutex::unlock. |
|
Unsubscribe a producer from the producer notification list.
This fails, by throwing an
Definition at line 60 of file s3_fifo_base.cc. References s3_mutex::lock, notification_lock, producers, and s3_mutex::unlock. |
|
List of subscribed consumers.
Definition at line 58 of file s3_fifo_base.h. Referenced by is_subscribed_consumer, notify_consumers, subscribe_consumer, and unsubscribe_consumer. |
|
Mutex protecting the notification mechanism.
Definition at line 62 of file s3_fifo_base.h. Referenced by is_subscribed_consumer, is_subscribed_producer, notify_consumers, notify_producers, subscribe_consumer, subscribe_producer, unsubscribe_consumer, and unsubscribe_producer. |
|
List of subscribed producers.
Definition at line 54 of file s3_fifo_base.h. Referenced by is_subscribed_producer, notify_producers, subscribe_producer, and unsubscribe_producer. |
Send comments to: s3fc@stonethree.com |
|