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)
virtual Proactor_Type get_impl_type (void)
 ACE_POSIX_SIG_Proactor (const sigset_t mask_set, size_t nmaxop = ACE_AIO_DEFAULT_SIZE)
virtual ~ACE_POSIX_SIG_Proactor (void)
 Destructor.

virtual int handle_events (ACE_Time_Value &wait_time)
virtual int handle_events (void)
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)
 Post a result to the completion port of the Proactor. now it is implemented in base ACE_POSIX_AIOCB_Proactor classvirtual int post_completion (ACE_POSIX_Asynch_Result *result);. More...


Protected Methods

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

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

virtual int handle_events (u_long milli_seconds)
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.


Protected Attributes

sigset_t RT_completion_signals_

Friends

class  ACE_POSIX_SIG_Asynch_Operation

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 nmaxop = ACE_AIO_DEFAULT_SIZE )
 

This constructor masks only the 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 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. 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.

These signals are used for completion notification by the Proactor. The signals specified while issueing 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]
 

Post a result to the completion port of the Proactor. now it is implemented in base ACE_POSIX_AIOCB_Proactor classvirtual int post_completion (ACE_POSIX_Asynch_Result *result);.

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

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 at Sat Dec 1 11:04:17 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000