summaryrefslogtreecommitdiff
path: root/ace/POSIX_Proactor.h
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-06-20 04:53:02 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-06-20 04:53:02 +0000
commit26c64d921c76a4833a698b147bdb34c84b8a8900 (patch)
treecaa9d1df2c3f4ef782bffa7810f0c968eef7c627 /ace/POSIX_Proactor.h
parentb157bc621706d2049876cd60387287046f020733 (diff)
downloadATCD-26c64d921c76a4833a698b147bdb34c84b8a8900.tar.gz
Incorporated Alex Libman <Alibman@baltimore.com> suggestions.
- MT safe'ing AIOCB proactor. It does not improve efficiency though. - Enabling the completion call backs even if aio_return fails. We will call the completion call back methods with 0 transferred data parameter. Thanks Alex for the great inputs!.
Diffstat (limited to 'ace/POSIX_Proactor.h')
-rw-r--r--ace/POSIX_Proactor.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/ace/POSIX_Proactor.h b/ace/POSIX_Proactor.h
index de8dece5e4d..f83cce01695 100644
--- a/ace/POSIX_Proactor.h
+++ b/ace/POSIX_Proactor.h
@@ -60,7 +60,7 @@ public:
// Close down the Proactor.
virtual int register_handle (ACE_HANDLE handle,
- const void *completion_key);
+ const void *completion_key);
// This function is a no-op function for Unix systems. Returns 0.
virtual int post_completion (ACE_POSIX_Asynch_Result *result) = 0;
@@ -165,10 +165,10 @@ protected:
// Constructor.
void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
+ u_long bytes_transferred,
+ int success,
+ const void *completion_key,
+ u_long error);
// 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
@@ -256,14 +256,14 @@ protected:
// dispatched. Return -1 on errors.
void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
+ u_long bytes_transferred,
+ int success,
+ const void *completion_key,
+ u_long error);
// We will call the base class's application_specific_code from
// here.
- int register_aio_with_proactor (ACE_POSIX_Asynch_Result *result);
+ int register_aio_with_proactor (ACE_POSIX_Asynch_Result *result, int operation);
// If the ptr is o, just check whether there is any slot free and
// return 0 if yes, else return -1. If a valid ptr is passed, keep it
// in a free slot.
@@ -288,6 +288,9 @@ protected:
size_t aiocb_list_cur_size_;
// To maintain the current size of the array (list).
+
+ ACE_Thread_Mutex mtx_AIOCB_;
+ // To make AIOCB proactor thread safe.
};
class ACE_Export ACE_POSIX_SIG_Proactor : public ACE_POSIX_Proactor