Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_POSIX_SIG_Proactor Class Reference

This Proactor implementation does compeltion querying using POSIX Real Time signals. <sigtimedwait>/<sigwaitinfo> call is used to get the notify/get the completions. The real-time signals that are going to be used with this Proactor should be given apriori in the constructor, so that those signals can be masked from asynchornous delivery. More...

#include <POSIX_Proactor.h>

Inheritance diagram for ACE_POSIX_SIG_Proactor:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_SIG_Proactor:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_POSIX_SIG_Proactor (size_t nmaxop=ACE_AIO_DEFAULT_SIZE)
 This constructor masks only the <ACE_SIGRTMIN> real-time signal. More...

virtual Proactor_Type get_impl_type (void)
 ACE_POSIX_SIG_Proactor (const sigset_t mask_set, size_t nmaxop=ACE_AIO_DEFAULT_SIZE)
 This constructor should be used to tell the Proactor to mask and wait for the real-time signals specified in this set. More...

virtual ~ACE_POSIX_SIG_Proactor (void)
 Destructor. More...

virtual int handle_events (ACE_Time_Value &wait_time)
 Dispatch a single set of events. More...

virtual int handle_events (void)
 Block indefinitely until at least one event is dispatched. More...

virtual ACE_Asynch_Result_Implcreate_asynch_timer (ACE_Handler &handler, const void *act, const ACE_Time_Value &tv, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN)
 If <signal_number> is -1, check with the Proactor and use one of the signals that is present in the mask set (i.e., the signals for which the Proactor will be waiting) of the Proactor. More...


Protected Methods

int setup_signal_handler (int signal_number) const
 To setup the handler for a real-time signbal. More...

int mask_signals (const sigset_t *signals) const
 To mask all the specified signals in a thread. More...

virtual int handle_events (u_long milli_seconds)
 Dispatch a single set of events. More...

virtual int allocate_aio_slot (ACE_POSIX_Asynch_Result *result)
 Find free slot to store result and aiocb pointer. More...

virtual int notify_completion (int sig_num)
 Notify queue of "post_completed" ACE_POSIX_Asynch_Results called from post_completion method. More...


Protected Attributes

sigset_t RT_completion_signals_

Friends

class ACE_POSIX_SIG_Asynch_Operation
 This class does the registering of Asynch Operations with the Proactor which is necessary in the SIG strategy, because we need to store the signal number. More...


Detailed Description

This Proactor implementation does compeltion querying using POSIX Real Time signals. <sigtimedwait>/<sigwaitinfo> call is used to get the notify/get the completions. The real-time signals that are going to be used with this Proactor should be given apriori in the constructor, so that those signals can be masked from asynchornous delivery.


Constructor & Destructor Documentation

ACE_POSIX_SIG_Proactor::ACE_POSIX_SIG_Proactor size_t    max_aio_operations = ACE_AIO_DEFAULT_SIZE
 

This constructor masks only the <ACE_SIGRTMIN> real-time signal.

Only this signal should be used to issue asynchronous operations using this Proctor.

ACE_POSIX_SIG_Proactor::ACE_POSIX_SIG_Proactor const sigset_t    signal_set,
size_t    max_aio_operations = ACE_AIO_DEFAULT_SIZE
 

This constructor should be used to tell the Proactor to mask and wait for the real-time signals specified in this set.

Only these signals should be used by the asynchronous operations when they use this Proactor.

ACE_POSIX_SIG_Proactor::~ACE_POSIX_SIG_Proactor void    [virtual]
 

Destructor.


Member Function Documentation

int ACE_POSIX_SIG_Proactor::allocate_aio_slot ACE_POSIX_Asynch_Result   result [protected, virtual]
 

Find free slot to store result and aiocb pointer.

The signals specified while issueing <Asynch Operation>s are stored here in this set. These signals are masked for a thread when it calls the Proactor::handle_events.

Reimplemented from ACE_POSIX_AIOCB_Proactor.

ACE_Asynch_Result_Impl * ACE_POSIX_SIG_Proactor::create_asynch_timer ACE_Handler   handler,
const void *    act,
const ACE_Time_Value   tv,
ACE_HANDLE    event = ACE_INVALID_HANDLE,
int    priority = 0,
int    signal_number = ACE_SIGRTMIN
[virtual]
 

If <signal_number> is -1, check with the Proactor and use one of the signals that is present in the mask set (i.e., the signals for which the Proactor will be waiting) of the Proactor.

If there are more than one signal, the higher numbered signal will be chosen.

Reimplemented from ACE_POSIX_Proactor.

ACE_INLINE ACE_POSIX_Proactor::Proactor_Type ACE_POSIX_SIG_Proactor::get_impl_type void    [virtual]
 

Reimplemented from ACE_POSIX_AIOCB_Proactor.

int ACE_POSIX_SIG_Proactor::handle_events u_long    milli_seconds [protected, virtual]
 

Dispatch a single set of events.

If <milli_seconds> elapses before any events occur, return 0. Return 1 if a completion is dispatched. Return -1 on errors.

Reimplemented from ACE_POSIX_AIOCB_Proactor.

int ACE_POSIX_SIG_Proactor::handle_events void    [virtual]
 

Block indefinitely until at least one event is dispatched.

Dispatch a single set of events. If <wait_time> elapses before any events occur, return 0. Return 1 on success i.e., when a completion is dispatched, non-zero (-1) on errors and errno is set accordingly.

Reimplemented from ACE_POSIX_AIOCB_Proactor.

int ACE_POSIX_SIG_Proactor::handle_events ACE_Time_Value   wait_time [virtual]
 

Dispatch a single set of events.

If <wait_time> elapses before any events occur, return 0. Return 1 on success i.e., when a completion is dispatched, non-zero (-1) on errors and errno is set accordingly.

Reimplemented from ACE_POSIX_AIOCB_Proactor.

int ACE_POSIX_SIG_Proactor::mask_signals const sigset_t *    signals const [protected]
 

To mask all the specified signals in a thread.

int ACE_POSIX_SIG_Proactor::notify_completion int    sig_num [protected, virtual]
 

Notify queue of "post_completed" ACE_POSIX_Asynch_Results called from post_completion method.

Reimplemented from ACE_POSIX_AIOCB_Proactor.

int ACE_POSIX_SIG_Proactor::setup_signal_handler int    signal_number const [protected]
 

To setup the handler for a real-time signbal.


Friends And Related Function Documentation

friend class ACE_POSIX_SIG_Asynch_Operation [friend]
 

This class does the registering of Asynch Operations with the Proactor which is necessary in the SIG strategy, because we need to store the signal number.


Member Data Documentation

sigset_t ACE_POSIX_SIG_Proactor::RT_completion_signals_ [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 17:10:56 2002 for ACE by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001