summaryrefslogtreecommitdiff
path: root/ace/POSIX_Proactor.h
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-25 05:52:29 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-25 05:52:29 +0000
commit04135dc026251b550b70cd926195713ec5f5bce5 (patch)
tree540084666e6f63938d7d5975c82a5024afffb2fd /ace/POSIX_Proactor.h
parent82f3b6c4217127af826ea1db40bc4e9adf09f8ec (diff)
downloadATCD-04135dc026251b550b70cd926195713ec5f5bce5.tar.gz
Changed the return values of the <ACE_Proactor::handle_events> API to
return -1 on error, 0 on timeout, 1 on success. This has been done so that it looks like the <ACE_Reactor::handle_events>. Previously <ACE_Proactor::handle_events> was returning -1 on error, 0 on success and 0 on timeout also. Fixed the <ACE_POSIX_AIOCB_Proactor::handle_events> and <ACE_POSIX_SIG_Proactor::handle_events> to do indefinite blocking when ACE_INFINITE is passed. <sigwaitinfo> is used instead of <sigtimedwait>. Renamed the <ACE_AIO_Accept_Handler> class to more appropriate <ACE_Notify_Pipe_Manager>.
Diffstat (limited to 'ace/POSIX_Proactor.h')
-rw-r--r--ace/POSIX_Proactor.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/ace/POSIX_Proactor.h b/ace/POSIX_Proactor.h
index 0f57c7942e2..5a6293cd46d 100644
--- a/ace/POSIX_Proactor.h
+++ b/ace/POSIX_Proactor.h
@@ -127,7 +127,8 @@ public:
#endif /* 0 */
virtual ACE_HANDLE get_handle (void) const;
- // Get the event handle.
+ // Get the event handle. This is a no-op in POSIX. Returns
+ // ACE_INVALID_HANDLE.
// Methods used to create Asynch_IO_Result objects. We create the right
// objects here in these methods.
@@ -242,15 +243,15 @@ class ACE_Export ACE_POSIX_AIOCB_Proactor : public ACE_POSIX_Proactor
// = TITLE
//
// This Proactor makes use of Asynchronous I/O Control Blocks
- // (AIOCB) to get the completion status of the <aio_> operations
- // issued.
+ // (AIOCB) to notify/get the completion status of the <aio_>
+ // operations issued.
//
// = DESCRIPTION
//
friend class ACE_AIOCB_Notify_Pipe_Manager;
// Handler needs to call application specific code.
-
+
friend class ACE_POSIX_AIOCB_Asynch_Operation;
// This class does the registering of Asynch Operations with the
// Proactor which is necessary in the AIOCB strategy.
@@ -268,13 +269,16 @@ public:
virtual int handle_events (ACE_Time_Value &wait_time);
// Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return. Return 0 on success, non-zero (-1) on
- // timeouts/errors and errno is set accordingly.
+ // 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.
virtual int handle_events (void);
// Block indefinitely until at least one event is dispatched.
- // Return 0 on success, non-zero (-1) on timeouts/errors and errno
- // is set accordingly.
+ // 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.
virtual int post_completion (ACE_POSIX_Asynch_Result *result);
// Post a result to the completion port of the Proactor.
@@ -297,7 +301,8 @@ public:
protected:
virtual int handle_events (unsigned long milli_seconds);
// Dispatch a single set of events. If <milli_seconds> elapses
- // before any events occur, return.
+ // before any events occur, return 0. Return 1 if a completion
+ // dispatched. Return -1 on errors.
void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
u_long bytes_transferred,
@@ -348,14 +353,17 @@ public:
virtual int handle_events (ACE_Time_Value &wait_time);
// Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return. Return 0 on success, non-zero (-1) on
- // timeouts/errors and errno is set accordingly.
+ // 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.
virtual int handle_events (void);
// Block indefinitely until at least one event is dispatched.
- // Return 0 on success, non-zero (-1) on timeouts/errors and errno
- // is set accordingly.
-
+ // 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.
+
virtual int post_completion (ACE_POSIX_Asynch_Result *result);
// Post a result to the completion port of the Proactor.
@@ -377,7 +385,8 @@ public:
protected:
virtual int handle_events (unsigned long milli_seconds);
// Dispatch a single set of events. If <milli_seconds> elapses
- // before any events occur, return.
+ // before any events occur, return 0. Return 1 if a completion is
+ // dispatched. Return -1 on errors.
sigset_t RT_completion_signals_;
// These signals are used for completion notification by the