ACE 8.0.0
|
POSIX implementation of the Proactor. More...
#include <POSIX_Proactor.h>
Public Types | |
enum | Proactor_Type { PROACTOR_POSIX = 0 , PROACTOR_AIOCB = 1 , PROACTOR_SIG = 2 , PROACTOR_CB = 4 } |
enum | SystemType { ACE_OS_UNDEFINED = 0x0000 , ACE_OS_WIN = 0x0100 , ACE_OS_WIN_NT = ACE_OS_WIN | 0x0001 , ACE_OS_WIN_2000 = ACE_OS_WIN | 0x0002 , ACE_OS_LINUX = 0x0800 , ACE_OS_FREEBSD = 0x1000 , ACE_OS_IRIX = 0x2000 , ACE_OS_OPENBSD = 0x4000 } |
enum | Opcode { ACE_OPCODE_READ = 1 , ACE_OPCODE_WRITE = 2 } |
![]() | |
enum | { LO_PRIORITY = 0 , HI_PRIORITY = 10 , NULL_MASK = 0 , READ_MASK = (1 << 0) , WRITE_MASK = (1 << 1) , EXCEPT_MASK = (1 << 2) , ACCEPT_MASK = (1 << 3) , CONNECT_MASK = (1 << 4) , TIMER_MASK = (1 << 5) , QOS_MASK = (1 << 6) , GROUP_QOS_MASK = (1 << 7) , SIGNAL_MASK = (1 << 8) , ALL_EVENTS_MASK , RWE_MASK , DONT_CALL = (1 << 9) } |
enum | { ACE_EVENT_HANDLER_NOT_RESUMED = -1 , ACE_REACTOR_RESUMES_HANDLER = 0 , ACE_APPLICATION_RESUMES_HANDLER } |
typedef long | Reference_Count |
Reference count type. | |
Protected Member Functions | |
ACE_POSIX_Proactor () | |
Constructor. | |
void | application_specific_code (ACE_POSIX_Asynch_Result *asynch_result, size_t bytes_transferred, const void *completion_key, u_long error) |
virtual int | post_wakeup_completions (int how_many) |
![]() | |
ACE_Event_Handler (ACE_Reactor *=nullptr, int priority=ACE_Event_Handler::LO_PRIORITY) | |
Force ACE_Event_Handler to be an abstract base class. | |
Protected Attributes | |
ACE_Handler | wakeup_handler_ |
int | os_id_ |
![]() | |
Atomic_Reference_Count | reference_count_ |
Reference count. | |
Private Attributes | |
ACE_Asynch_Pseudo_Task | pseudo_task_ |
Task to process pseudo-asynchronous accept/connect. | |
Additional Inherited Members | |
![]() | |
static ACE_THR_FUNC_RETURN | read_adapter (void *event_handler) |
static int | register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED) |
static int | remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr) |
Performs the inverse of the register_stdin_handler() method. | |
![]() | |
typedef std::atomic< Reference_Count > | Atomic_Reference_Count |
Typedef for implementation of reference counting. | |
POSIX implementation of the Proactor.
There are two different strategies by which Proactor can get to know the completion of <aio> operations. One is based on Asynchronous I/O Control Blocks (AIOCB) where a list of AIOCBs are stored and completion status of the corresponding operations are queried on them. The other one is based on POSIX Real Time signals. This class abstracts out the common code needed for both the strategies. ACE_POSIX_AIOCB_Proactor and ACE_POSIX_SIG_Proactor specialize this class for each strategy.
|
virtual |
Virtual destructor.
|
protected |
Constructor.
|
protected |
Protect against structured exceptions caused by user code when dispatching handles. The <completion_key> is not very useful compared to <AST> that can be associated each asynchronous operation. <completion_key> is implemented right now for the POSIX Proators.
|
pure virtual |
Implemented in ACE_POSIX_AIOCB_Proactor.
|
virtual |
@ This is a no-op on POSIX platforms. Returns 0.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Accept.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Accept::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Connect.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Connect::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Read_Dgram.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Read_Dgram::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Read_File.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Read_File::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Read_Stream.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Read_Stream::Result class.
Implements ACE_Proactor_Impl.
|
virtual |
Create a timer result object which can be used with the Timer mechanism of the Proactor.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Transmit_File.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Transmit_File::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Write_Dgram.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Write_Dgram::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Write_File.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Write_File::Result.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for doing Asynch_Write_Stream.
Implements ACE_Proactor_Impl.
|
virtual |
Create the correct implementation class for ACE_Asynch_Write_Stream::Result.
Implements ACE_Proactor_Impl.
|
inline |
Task to process pseudo-asynchronous operations.
|
virtual |
This is a no-op in POSIX. Returns ACE_INVALID_HANDLE.
Implements ACE_Proactor_Impl.
|
virtual |
Reimplemented in ACE_POSIX_CB_Proactor, and ACE_POSIX_AIOCB_Proactor.
Block indefinitely until at least one event is dispatched. Dispatch a single set of events.Return 1 on success i.e., when a completion is dispatched, non-zero (-1) on errors and errno is set accordingly.
Implements ACE_Proactor_Impl.
Implemented in ACE_POSIX_CB_Proactor, and ACE_POSIX_AIOCB_Proactor.
|
pure 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.
Implements ACE_Proactor_Impl.
Implemented in ACE_POSIX_CB_Proactor, and ACE_POSIX_AIOCB_Proactor.
|
virtual |
@ This is a no-op on POSIX platforms. Returns 0.
Implements ACE_Proactor_Impl.
Set number of thread used as a parameter to CreatIoCompletionPort.
Implements ACE_Proactor_Impl.
|
pure virtual |
Post a result to the completion port of the Proactor. If errors occur, the result will be deleted by this method. If successful, the result will be deleted by the Proactor when the result is removed from the completion port. Therefore, the result should have been dynamically allocated and should be orphaned by the user once this method is called.
Implemented in ACE_POSIX_AIOCB_Proactor.
Post <how_many> completions to the completion port so that all threads can wake up. This is used in conjunction with the <run_event_loop>.
Implements ACE_Proactor_Impl.
|
virtual |
This function is a no-op function for Unix systems. Returns 0.
Implements ACE_Proactor_Impl.
|
pure virtual |
Implemented in ACE_POSIX_AIOCB_Proactor.
|
virtual |
@ This is a no-op on POSIX platforms. Returns 0.
Implements ACE_Proactor_Impl.
|
protected |
|
private |
Task to process pseudo-asynchronous accept/connect.
|
protected |
Handler to handle the wakeups. This works in conjunction with the <ACE_Proactor::run_event_loop>.