summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-31 14:38:49 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-31 14:38:49 +0000
commite1ba2201c7e7109130f4ab4e3d7dde59038b7a25 (patch)
tree3770b8cdb436a53c8321c37678b20b50f5415507
parent688b50d6e8df997a847ed6ce294062d9340e4a6c (diff)
downloadATCD-e1ba2201c7e7109130f4ab4e3d7dde59038b7a25.tar.gz
replaced NSIG with ACE_NSIG
-rw-r--r--ace/Log_Msg.cpp2
-rw-r--r--ace/OS.i6
-rw-r--r--ace/Select_Reactor.cpp68
-rw-r--r--ace/Signal.cpp23
-rw-r--r--ace/Signal.h56
-rw-r--r--ace/Signal.i28
-rw-r--r--ace/WFMO_Reactor.i414
-rw-r--r--tests/Sigset_Ops_Test.cpp38
8 files changed, 317 insertions, 318 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 67784e68872..28c30aa495b 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -744,7 +744,7 @@ ACE_Log_Msg::log (const char *format_str,
int sig = va_arg (argp, int);
type = SKIP_SPRINTF;
#if defined (ACE_HAS_SYS_SIGLIST)
- if (sig >= 0 && sig < NSIG)
+ if (sig >= 0 && sig < ACE_NSIG)
ACE_OS::strcpy (bp, _sys_siglist[sig]);
else
ACE_OS::sprintf (bp, "<unknown signal> %d", sig);
diff --git a/ace/OS.i b/ace/OS.i
index c2a11c671a3..f0705cb9922 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -8188,7 +8188,7 @@ ACE_OS::sigaddset (sigset_t *s, int signum)
errno = EFAULT ;
return -1 ;
}
- if (signum < 1 || signum >= NSIG) {
+ if (signum < 1 || signum >= ACE_NSIG) {
errno = EINVAL ;
return -1 ; // Invalid signum, return error
}
@@ -8207,7 +8207,7 @@ ACE_OS::sigdelset (sigset_t *s, int signum)
errno = EFAULT ;
return -1 ;
}
- if (signum < 1 || signum >= NSIG) {
+ if (signum < 1 || signum >= ACE_NSIG) {
errno = EINVAL ;
return -1 ; // Invalid signum, return error
}
@@ -8256,7 +8256,7 @@ ACE_OS::sigismember (sigset_t *s, int signum)
errno = EFAULT ;
return -1 ;
}
- if (signum < 1 || signum >= NSIG) {
+ if (signum < 1 || signum >= ACE_NSIG) {
errno = EINVAL ;
return -1 ; // Invalid signum, return error
}
diff --git a/ace/Select_Reactor.cpp b/ace/Select_Reactor.cpp
index 139d5649a1a..3a109e44a48 100644
--- a/ace/Select_Reactor.cpp
+++ b/ace/Select_Reactor.cpp
@@ -1128,8 +1128,8 @@ ACE_Select_Reactor::register_handler (const ACE_Sig_Set &sigset,
int result = 0;
-#if (NSIG > 0)
- for (int s = 1; s < NSIG; s++)
+#if (ACE_NSIG > 0)
+ for (int s = 1; s < ACE_NSIG; s++)
if (sigset.is_member (s)
&& this->signal_handler_->register_handler (s, new_sh,
new_disp) == -1)
@@ -1138,7 +1138,7 @@ ACE_Select_Reactor::register_handler (const ACE_Sig_Set &sigset,
ACE_UNUSED_ARG (sigset);
ACE_UNUSED_ARG (new_sh);
ACE_UNUSED_ARG (new_disp);
-#endif /* NSIG */
+#endif /* ACE_NSIG */
return result;
}
@@ -1148,14 +1148,14 @@ ACE_Select_Reactor::remove_handler (const ACE_Sig_Set &sigset)
ACE_TRACE ("ACE_Select_Reactor::remove_handler");
int result = 0;
-#if (NSIG > 0)
- for (int s = 1; s < NSIG; s++)
+#if (ACE_NSIG > 0)
+ for (int s = 1; s < ACE_NSIG; s++)
if (sigset.is_member (s)
&& this->signal_handler_->remove_handler (s) == -1)
result = -1;
#else
ACE_UNUSED_ARG (sigset);
-#endif /* NSIG */
+#endif /* ACE_NSIG */
return result;
}
@@ -1528,27 +1528,27 @@ ACE_Select_Reactor::dispatch_notification_handlers (int &number_of_active_handle
int
ACE_Select_Reactor::dispatch_io_set (int number_of_active_handles,
- int& number_dispatched,
- int mask,
- ACE_Handle_Set& dispatch_mask,
- ACE_Handle_Set& ready_mask,
- ACE_EH_PTMF callback)
+ int& number_dispatched,
+ int mask,
+ ACE_Handle_Set& dispatch_mask,
+ ACE_Handle_Set& ready_mask,
+ ACE_EH_PTMF callback)
{
ACE_HANDLE handle;
ACE_Handle_Set_Iterator handle_iter (dispatch_mask);
while ((handle = handle_iter ()) != ACE_INVALID_HANDLE
- && number_dispatched < number_of_active_handles
- && this->state_changed_ == 0)
+ && number_dispatched < number_of_active_handles
+ && this->state_changed_ == 0)
{
// ACE_DEBUG ((LM_DEBUG, "ACE_Select_Reactor::dispatching\n"));
number_dispatched++;
this->notify_handle (handle,
- mask,
- ready_mask,
- this->handler_rep_.find (handle),
- callback);
+ mask,
+ ready_mask,
+ this->handler_rep_.find (handle),
+ callback);
}
if (number_dispatched > 0 && this->state_changed_)
@@ -1571,11 +1571,11 @@ ACE_Select_Reactor::dispatch_io_handlers (int &number_of_active_handles,
// ACE_DEBUG ((LM_DEBUG, "ACE_Select_Reactor::dispatch - WRITE\n"));
if (this->dispatch_io_set (number_of_active_handles,
- number_dispatched,
- ACE_Event_Handler::WRITE_MASK,
- dispatch_set.wr_mask_,
- this->ready_set_.wr_mask_,
- &ACE_Event_Handler::handle_output) == -1)
+ number_dispatched,
+ ACE_Event_Handler::WRITE_MASK,
+ dispatch_set.wr_mask_,
+ this->ready_set_.wr_mask_,
+ &ACE_Event_Handler::handle_output) == -1)
{
number_of_active_handles -= number_dispatched;
return -1;
@@ -1584,11 +1584,11 @@ ACE_Select_Reactor::dispatch_io_handlers (int &number_of_active_handles,
// ACE_DEBUG ((LM_DEBUG, "ACE_Select_Reactor::dispatch - EXCEPT\n"));
if (this->dispatch_io_set (number_of_active_handles,
- number_dispatched,
- ACE_Event_Handler::EXCEPT_MASK,
- dispatch_set.ex_mask_,
- this->ready_set_.ex_mask_,
- &ACE_Event_Handler::handle_exception) == -1)
+ number_dispatched,
+ ACE_Event_Handler::EXCEPT_MASK,
+ dispatch_set.ex_mask_,
+ this->ready_set_.ex_mask_,
+ &ACE_Event_Handler::handle_exception) == -1)
{
number_of_active_handles -= number_dispatched;
return -1;
@@ -1596,11 +1596,11 @@ ACE_Select_Reactor::dispatch_io_handlers (int &number_of_active_handles,
// ACE_DEBUG ((LM_DEBUG, "ACE_Select_Reactor::dispatch - READ\n"));
if (this->dispatch_io_set (number_of_active_handles,
- number_dispatched,
- ACE_Event_Handler::READ_MASK,
- dispatch_set.rd_mask_,
- this->ready_set_.rd_mask_,
- &ACE_Event_Handler::handle_input) == -1)
+ number_dispatched,
+ ACE_Event_Handler::READ_MASK,
+ dispatch_set.rd_mask_,
+ this->ready_set_.rd_mask_,
+ &ACE_Event_Handler::handle_input) == -1)
{
number_of_active_handles -= number_dispatched;
return -1;
@@ -1668,12 +1668,12 @@ ACE_Select_Reactor::dispatch (int number_of_active_handles,
// are trying to update the <Reactor>.
else if (this->dispatch_notification_handlers (number_of_active_handles,
- dispatch_set) == -1)
+ dispatch_set) == -1)
break; // State has changed, exit inner loop.
// Finally, dispatch the I/O handlers.
else if (this->dispatch_io_handlers (number_of_active_handles,
- dispatch_set) == -1)
+ dispatch_set) == -1)
// State has changed, so exit the inner loop.
break;
}
diff --git a/ace/Signal.cpp b/ace/Signal.cpp
index 0f62771f5e4..589e7e953b0 100644
--- a/ace/Signal.cpp
+++ b/ace/Signal.cpp
@@ -1,4 +1,3 @@
-// Signal.cpp
// $Id$
#define ACE_BUILD_DLL
@@ -42,7 +41,7 @@ static ACE_SignalHandler ace_signal_handlers_dispatcher = ACE_SignalHandler (ACE
#endif /* ACE_HAS_SIG_C_FUNC */
// Array of Event_Handlers that will handle the signals.
-ACE_Event_Handler *ACE_Sig_Handler::signal_handlers_[NSIG];
+ACE_Event_Handler *ACE_Sig_Handler::signal_handlers_[ACE_NSIG];
// Remembers if a signal has occurred.
sig_atomic_t ACE_Sig_Handler::sig_pending_ = 0;
@@ -151,7 +150,7 @@ ACE_Sig_Action::ACE_Sig_Action (ACE_SignalHandler sig_handler,
this->sa_.sa_flags = sig_flags;
// Structure assignment...
- this->sa_.sa_mask = sig_mask.sigset ();
+ this->sa_.sa_mask = sig_mask.sigset ();
#if !defined(ACE_HAS_TANDEM_SIGNALS)
this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
@@ -174,9 +173,9 @@ ACE_Sig_Handler::sig_pending (void)
{
ACE_TRACE ("ACE_Sig_Handler::sig_pending");
ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
+ ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
+ (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
+ ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
return ACE_Sig_Handler::sig_pending_ != 0;
}
@@ -185,9 +184,9 @@ ACE_Sig_Handler::sig_pending (int pending)
{
ACE_TRACE ("ACE_Sig_Handler::sig_pending");
ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
+ ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
+ (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
+ ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
ACE_Sig_Handler::sig_pending_ = pending;
}
@@ -434,17 +433,17 @@ public:
static ACE_SIG_HANDLERS_SET *instance (int signum);
private:
- static ACE_SIG_HANDLERS_SET *sig_handlers_[NSIG];
+ static ACE_SIG_HANDLERS_SET *sig_handlers_[ACE_NSIG];
};
/* static */
-ACE_SIG_HANDLERS_SET *ACE_Sig_Handlers_Set::sig_handlers_[NSIG];
+ACE_SIG_HANDLERS_SET *ACE_Sig_Handlers_Set::sig_handlers_[ACE_NSIG];
/* static */
ACE_SIG_HANDLERS_SET *
ACE_Sig_Handlers_Set::instance (int signum)
{
- if (signum <= 0 || signum >= NSIG)
+ if (signum <= 0 || signum >= ACE_NSIG)
return 0; // This will cause problems...
else if (ACE_Sig_Handlers_Set::sig_handlers_[signum] == 0)
ACE_NEW_RETURN (ACE_Sig_Handlers_Set::sig_handlers_[signum], ACE_SIG_HANDLERS_SET, 0);
diff --git a/ace/Signal.h b/ace/Signal.h
index cac53eca0d6..1709d4d9881 100644
--- a/ace/Signal.h
+++ b/ace/Signal.h
@@ -5,13 +5,13 @@
//
// = LIBRARY
// ace
-//
+//
// = FILENAME
// Signal.h
//
// = AUTHOR
-// Doug Schmidt
-//
+// Doug Schmidt
+//
// ============================================================================
#if !defined (ACE_SIGNAL_HANDLER_H)
@@ -27,8 +27,8 @@ class ACE_Export ACE_Sig_Set
{
// = TITLE
// Provide a C++ wrapper for the C sigset_t interface.
- //
- // = DESCRIPTION
+ //
+ // = DESCRIPTION
// Handle signals via a more elegant C++ interface (e.g.,
// doesn't require the use of global variables or global
// functions in an application).
@@ -171,7 +171,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- ACE_Sig_Set omask_;
+ ACE_Sig_Set omask_;
// Original signal mask.
};
@@ -191,9 +191,9 @@ class ACE_Export ACE_Sig_Handler
// <ACE_Event_Handler> is invoked automatically.
public:
// = Registration and removal methods.
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
+ virtual int register_handler (int signum,
+ ACE_Event_Handler *new_sh,
+ ACE_Sig_Action *new_disp = 0,
ACE_Event_Handler **old_sh = 0,
ACE_Sig_Action *old_disp = 0);
// Add a new <ACE_Event_Handler> and a new sigaction associated with
@@ -201,7 +201,7 @@ public:
// sigaction if pointers are non-zero. Returns -1 on failure and >=
// 0 on success.
- virtual int remove_handler (int signum,
+ virtual int remove_handler (int signum,
ACE_Sig_Action *new_disp = 0,
ACE_Sig_Action *old_disp = 0,
int sigkey = -1);
@@ -214,16 +214,16 @@ public:
// Set/get signal status.
static int sig_pending (void);
- // True if there is a pending signal.
+ // True if there is a pending signal.
static void sig_pending (int);
- // Reset the value of <sig_pending_> so that no signal is pending.
+ // Reset the value of <sig_pending_> so that no signal is pending.
// = Set/get the handler associated with a particular signal.
virtual ACE_Event_Handler *handler (int signum);
- // Return the list of <ACE_Sig_Handlers> associated with <signum>.
-
+ // Return the list of <ACE_Sig_Handlers> associated with <signum>.
+
virtual ACE_Event_Handler *handler (int signum, ACE_Event_Handler *);
// Set a new <ACE_Event_Handler> that is associated with <signum>.
// Return the existing handler.
@@ -239,17 +239,17 @@ public:
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
-protected:
- // = These methods and data members are shared by derived classes.
+protected:
+ // = These methods and data members are shared by derived classes.
static int in_range (int signum);
- // Check whether the SIGNUM is within the legal range of signals.
+ // Check whether the SIGNUM is within the legal range of signals.
static sig_atomic_t sig_pending_;
- // Keeps track of whether a signal is pending.
-
+ // Keeps track of whether a signal is pending.
+
private:
- static ACE_Event_Handler *signal_handlers_[NSIG];
+ static ACE_Event_Handler *signal_handlers_[ACE_NSIG];
// Array used to store one user-defined Event_Handler for every
// signal.
};
@@ -263,7 +263,7 @@ public:
ACE_Sig_Adapter (ACE_Sig_Action &, int sigkey);
ACE_Sig_Adapter (ACE_Event_Handler *, int sigkey);
ACE_Sig_Adapter (ACE_Sig_Handler_Ex, int sigkey = 0);
-
+
int sigkey (void);
// Returns this signal key that's used to remove this from the
// <ACE_Reactor>'s internal table.
@@ -275,7 +275,7 @@ private:
int sigkey_;
// Key for this signal handler (used to remove it).
- enum
+ enum
{
ACE_HANDLER, // We're just wrapping an ACE_Event_Handler.
SIG_ACTION, // An ACE_Sig_Action.
@@ -312,14 +312,14 @@ class ACE_Export ACE_Sig_Handlers : public ACE_Sig_Handler
// automatically.
public:
// = Registration and removal methods.
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
+ virtual int register_handler (int signum,
+ ACE_Event_Handler *new_sh,
+ ACE_Sig_Action *new_disp = 0,
ACE_Event_Handler **old_sh = 0,
ACE_Sig_Action *old_disp = 0);
// Add a new ACE_Event_Handler and a new sigaction associated with
// <signum>. Passes back the existing ACE_Event_Handler and its
- // sigaction if pointers are non-zero. Returns -1 on failure and
+ // sigaction if pointers are non-zero. Returns -1 on failure and
// a <sigkey> that is >= 0 on success.
virtual int remove_handler (int signum,
@@ -336,7 +336,7 @@ public:
virtual ACE_Event_Handler *handler (int signum);
// Return the head of the list of ACE_Sig_Handlers associated
// with SIGNUM.
-
+
virtual ACE_Event_Handler *handler (int signum, ACE_Event_Handler *);
// Set a new ACE_Event_Handler that is associated with SIGNUM at the
// head of the list of signals. Return the existing handler that
@@ -361,7 +361,7 @@ private:
static int third_party_sig_handler_;
// If this is > 0 then a 3rd party library has registered a
- // handler...
+ // handler...
};
#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
diff --git a/ace/Signal.i b/ace/Signal.i
index ed39ddaa810..f8e5edfbc40 100644
--- a/ace/Signal.i
+++ b/ace/Signal.i
@@ -49,7 +49,7 @@ ACE_INLINE int
ACE_Sig_Set::empty_set (void)
{
ACE_TRACE ("ACE_Sig_Set::empty_set");
- return ACE_OS::sigemptyset (&this->sigset_);
+ return ACE_OS::sigemptyset (&this->sigset_);
}
ACE_INLINE int
@@ -141,9 +141,9 @@ ACE_INLINE void
ACE_Sig_Action::handler (ACE_SignalHandler handler)
{
ACE_TRACE ("ACE_Sig_Action::handler");
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
+#if !defined(ACE_HAS_TANDEM_SIGNALS)
this->sa_.sa_handler = ACE_SignalHandlerV (handler);
-#else
+#else
this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (handler);
#endif /* !ACE_HAS_TANDEM_SIGNALS */
}
@@ -178,7 +178,7 @@ ACE_Sig_Action::get (void)
return &this->sa_;
}
-ACE_INLINE
+ACE_INLINE
ACE_Sig_Action::operator ACE_SIGACTION * ()
{
ACE_TRACE ("ACE_Sig_Action::operator ACE_SIGACTION *");
@@ -197,7 +197,7 @@ ACE_Sig_Action::register_action (int signum, ACE_Sig_Action *oaction)
{
ACE_TRACE ("ACE_Sig_Action::register_action");
struct sigaction *sa = oaction == 0 ? 0 : oaction->get ();
-
+
return ACE_OS::sigaction (signum, &this->sa_, sa);
}
@@ -216,9 +216,9 @@ ACE_Sig_Action::restore_action (int signum, ACE_Sig_Action &oaction)
return ACE_OS::sigaction (signum, &this->sa_, 0);
}
-// Block out the signal MASK until the destructor is called.
+// Block out the signal MASK until the destructor is called.
-ACE_INLINE
+ACE_INLINE
ACE_Sig_Guard::ACE_Sig_Guard (ACE_Sig_Set *mask)
{
//ACE_TRACE ("ACE_Sig_Guard::ACE_Sig_Guard");
@@ -229,29 +229,29 @@ ACE_Sig_Guard::ACE_Sig_Guard (ACE_Sig_Set *mask)
#if 0
ACE_Sig_Set smask (1);
#endif
-
+
#if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
ACE_OS::sigprocmask (SIG_BLOCK, (sigset_t *) ACE_Object_Manager::default_mask (), (sigset_t *)
- this->omask_);
+ this->omask_);
#else
ACE_OS::thr_sigsetmask (SIG_BLOCK, (sigset_t *) ACE_Object_Manager::default_mask (), (sigset_t *)
- this->omask_);
+ this->omask_);
#endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
}
else
#if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
ACE_OS::sigprocmask (SIG_BLOCK, (sigset_t *) *mask, (sigset_t *)
- this->omask_);
+ this->omask_);
#else
ACE_OS::thr_sigsetmask (SIG_BLOCK, (sigset_t *) *mask, (sigset_t *)
- this->omask_);
+ this->omask_);
#endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
}
// Restore the signal mask.
-ACE_INLINE
+ACE_INLINE
ACE_Sig_Guard::~ACE_Sig_Guard (void)
{
//ACE_TRACE ("ACE_Sig_Guard::~ACE_Sig_Guard");
@@ -266,5 +266,5 @@ ACE_INLINE int
ACE_Sig_Handler::in_range (int signum)
{
ACE_TRACE ("ACE_Sig_Handler::in_range");
- return signum > 0 && signum < NSIG;
+ return signum > 0 && signum < ACE_NSIG;
}
diff --git a/ace/WFMO_Reactor.i b/ace/WFMO_Reactor.i
index ca350500ac5..4860087bc6b 100644
--- a/ace/WFMO_Reactor.i
+++ b/ace/WFMO_Reactor.i
@@ -8,11 +8,11 @@
/************************************************************/
ACE_INLINE int
-ACE_Wakeup_All_Threads_Handler::handle_signal (int signum,
- siginfo_t *siginfo,
- ucontext_t *)
+ACE_Wakeup_All_Threads_Handler::handle_signal (int signum,
+ siginfo_t *siginfo,
+ ucontext_t *)
{
- ACE_UNUSED_ARG (signum);
+ ACE_UNUSED_ARG (signum);
ACE_UNUSED_ARG (siginfo);
// This will get called when <WFMO_Reactor->wakeup_all_threads_> event
@@ -23,11 +23,11 @@ ACE_Wakeup_All_Threads_Handler::handle_signal (int signum,
/************************************************************/
-ACE_INLINE
+ACE_INLINE
ACE_WFMO_Reactor_Handler_Repository::Common_Info::Common_Info (void)
: event_handler_ (0),
io_entry_ (0),
- io_handle_ (ACE_INVALID_HANDLE),
+ io_handle_ (ACE_INVALID_HANDLE),
network_events_ (0),
delete_event_ (0)
{
@@ -45,10 +45,10 @@ ACE_WFMO_Reactor_Handler_Repository::Common_Info::reset (void)
ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::Common_Info::set (int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event)
+ ACE_Event_Handler *event_handler,
+ ACE_HANDLE io_handle,
+ long network_events,
+ int delete_event)
{
this->event_handler_ = event_handler;
this->io_entry_ = io_entry;
@@ -65,39 +65,39 @@ ACE_WFMO_Reactor_Handler_Repository::Common_Info::set (Common_Info &common_info)
/************************************************************/
-ACE_INLINE
+ACE_INLINE
ACE_WFMO_Reactor_Handler_Repository::Current_Info::Current_Info (void)
: delete_entry_ (0),
close_masks_ (0),
suspend_entry_ (0)
-{
+{
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::Current_Info::set (int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry,
- ACE_Reactor_Mask close_masks,
- int suspend_entry)
+ ACE_Event_Handler *event_handler,
+ ACE_HANDLE io_handle,
+ long network_events,
+ int delete_event,
+ int delete_entry,
+ ACE_Reactor_Mask close_masks,
+ int suspend_entry)
{
this->delete_entry_ = delete_entry;
this->close_masks_ = close_masks;
this->suspend_entry_ = suspend_entry;
Common_Info::set (io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event);
+ event_handler,
+ io_handle,
+ network_events,
+ delete_event);
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::Current_Info::set (Common_Info &common_info,
- int delete_entry,
- ACE_Reactor_Mask close_masks,
- int suspend_entry)
+ int delete_entry,
+ ACE_Reactor_Mask close_masks,
+ int suspend_entry)
{
this->delete_entry_ = delete_entry;
this->close_masks_ = close_masks;
@@ -105,7 +105,7 @@ ACE_WFMO_Reactor_Handler_Repository::Current_Info::set (Common_Info &common_info
Common_Info::set (common_info);
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::Current_Info::reset (void)
{
this->delete_entry_ = 0;
@@ -116,37 +116,37 @@ ACE_WFMO_Reactor_Handler_Repository::Current_Info::reset (void)
/************************************************************/
-ACE_INLINE
+ACE_INLINE
ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::To_Be_Added_Info (void)
: event_handle_ (ACE_INVALID_HANDLE)
-{
+{
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::set (ACE_HANDLE event_handle,
- int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event)
+ int io_entry,
+ ACE_Event_Handler *event_handler,
+ ACE_HANDLE io_handle,
+ long network_events,
+ int delete_event)
{
this->event_handle_ = event_handle;
Common_Info::set (io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event);
+ event_handler,
+ io_handle,
+ network_events,
+ delete_event);
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::set (ACE_HANDLE event_handle,
- Common_Info &common_info)
+ Common_Info &common_info)
{
this->event_handle_ = event_handle;
Common_Info::set (common_info);
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::reset (void)
{
this->event_handle_ = ACE_INVALID_HANDLE;
@@ -155,7 +155,7 @@ ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::reset (void)
/************************************************************/
-ACE_INLINE
+ACE_INLINE
ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::Suspended_Info (void)
: event_handle_ (ACE_INVALID_HANDLE),
resume_entry_ (0),
@@ -176,38 +176,38 @@ ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::reset (void)
ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::set (ACE_HANDLE event_handle,
- int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int resume_entry,
- int delete_entry,
- ACE_Reactor_Mask close_masks)
+ int io_entry,
+ ACE_Event_Handler *event_handler,
+ ACE_HANDLE io_handle,
+ long network_events,
+ int delete_event,
+ int resume_entry,
+ int delete_entry,
+ ACE_Reactor_Mask close_masks)
{
this->event_handle_ = event_handle;
this->resume_entry_ = resume_entry;
this->delete_entry_ = delete_entry;
this->close_masks_ = close_masks;
Common_Info::set (io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event);
+ event_handler,
+ io_handle,
+ network_events,
+ delete_event);
}
ACE_INLINE void
ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::set (ACE_HANDLE event_handle,
- Common_Info &common_info,
- int resume_entry,
- int delete_entry,
- ACE_Reactor_Mask close_masks)
+ Common_Info &common_info,
+ int resume_entry,
+ int delete_entry,
+ ACE_Reactor_Mask close_masks)
{
this->event_handle_ = event_handle;
this->resume_entry_ = resume_entry;
this->delete_entry_ = delete_entry;
this->close_masks_ = close_masks;
- Common_Info::set (common_info);
+ Common_Info::set (common_info);
}
/************************************************************/
@@ -282,7 +282,7 @@ ACE_INLINE int
ACE_WFMO_Reactor_Handler_Repository::changes_required (void)
{
// Check if handles have be scheduled for additions or removal
- return this->handles_to_be_added_ > 0 ||
+ return this->handles_to_be_added_ > 0 ||
this->handles_to_be_deleted_ > 0 ||
this->handles_to_be_suspended_ > 0 ||
this->handles_to_be_resumed_ > 0;
@@ -307,21 +307,21 @@ ACE_WFMO_Reactor_Handler_Repository::make_changes (void)
ACE_INLINE int
ACE_WFMO_Reactor_Handler_Repository::unbind (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
if (this->invalid_handle (handle))
return -1;
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->wfmo_reactor_.lock_, -1);
-
+
int changes_required = 0;
int result = this->unbind_i (handle, mask, changes_required);
if (changes_required)
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wfmo_reactor_.wakeup_all_threads ();
-
+ this->wfmo_reactor_.wakeup_all_threads ();
+
return result;
}
@@ -329,179 +329,179 @@ ACE_WFMO_Reactor_Handler_Repository::unbind (ACE_HANDLE handle,
ACE_INLINE long
ACE_WFMO_Reactor::schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
+ const void *arg,
+ const ACE_Time_Value &delta_time,
+ const ACE_Time_Value &interval)
{
ACE_TRACE ("ACE_WFMO_Reactor::schedule_timer");
- long result = this->timer_queue_->schedule
+ long result = this->timer_queue_->schedule
(handler, arg, timer_queue_->gettimeofday () + delta_time, interval);
-
+
// Wakeup the owner thread so that it gets the latest timer values
this->notify ();
-
+
return result;
}
ACE_INLINE int
ACE_WFMO_Reactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
+ int dont_call_handle_close)
{
ACE_TRACE ("ACE_WFMO_Reactor::cancel_timer");
return this->timer_queue_->cancel (handler, dont_call_handle_close);
}
ACE_INLINE int
-ACE_WFMO_Reactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
+ACE_WFMO_Reactor::cancel_timer (long timer_id,
+ const void **arg,
+ int dont_call_handle_close)
{
ACE_TRACE ("ACE_WFMO_Reactor::cancel_timer");
return this->timer_queue_->cancel (timer_id, arg, dont_call_handle_close);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle)
+ ACE_HANDLE event_handle)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->handler_rep_.bind_i (0,
- event_handler,
- 0,
- ACE_INVALID_HANDLE,
- event_handle,
- 0);
+
+ return this->handler_rep_.bind_i (0,
+ event_handler,
+ 0,
+ ACE_INVALID_HANDLE,
+ event_handle,
+ 0);
}
ACE_INLINE int
ACE_WFMO_Reactor::register_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
return this->register_handler_i (ACE_INVALID_HANDLE,
- ACE_INVALID_HANDLE,
- event_handler,
- mask);
+ ACE_INVALID_HANDLE,
+ event_handler,
+ mask);
}
ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
+ACE_WFMO_Reactor::register_handler (ACE_HANDLE io_handle,
+ ACE_Event_Handler *event_handler,
+ ACE_Reactor_Mask mask)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
return this->register_handler_i (ACE_INVALID_HANDLE,
- io_handle,
- event_handler,
- mask);
+ io_handle,
+ event_handler,
+ mask);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
+ ACE_HANDLE io_handle,
+ ACE_Event_Handler *event_handler,
+ ACE_Reactor_Mask mask)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
return this->register_handler_i (event_handle,
- io_handle,
- event_handler,
- mask);
+ io_handle,
+ event_handler,
+ mask);
}
ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
+ACE_WFMO_Reactor::register_handler (const ACE_Handle_Set &handles,
+ ACE_Event_Handler *handler,
+ ACE_Reactor_Mask mask)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
ACE_Handle_Set_Iterator handle_iter (handles);
ACE_HANDLE h;
while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
if (this->register_handler_i (h, ACE_INVALID_HANDLE, handler, mask) == -1)
return -1;
-
- return 0;
+
+ return 0;
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::schedule_wakeup (ACE_HANDLE io_handle,
- ACE_Reactor_Mask masks_to_be_added)
+ ACE_Reactor_Mask masks_to_be_added)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
return this->schedule_wakeup_i (io_handle, masks_to_be_added);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::schedule_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_added)
+ ACE_Reactor_Mask masks_to_be_added)
{
// This GUARD is necessary since we are updating shared state.
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
return this->schedule_wakeup_i (event_handler->get_handle (), masks_to_be_added);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::remove_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
return this->handler_rep_.unbind (event_handler->get_handle (), mask);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
return this->handler_rep_.unbind (handle, mask);
}
ACE_INLINE int
ACE_WFMO_Reactor::remove_handler (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
ACE_Handle_Set_Iterator handle_iter (handles);
ACE_HANDLE h;
int changes_required = 0;
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
if (this->handler_rep_.unbind_i (h, mask, changes_required) == -1)
return -1;
-
+
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return 0;
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::cancel_wakeup (ACE_HANDLE io_handle,
- ACE_Reactor_Mask masks_to_be_removed)
+ ACE_Reactor_Mask masks_to_be_removed)
{
return this->remove_handler (io_handle, masks_to_be_removed);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_removed)
+ ACE_Reactor_Mask masks_to_be_removed)
{
return this->remove_handler (event_handler, masks_to_be_removed);
}
@@ -510,15 +510,15 @@ ACE_INLINE int
ACE_WFMO_Reactor::suspend_handler (ACE_HANDLE handle)
{
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
int changes_required = 0;
int result = this->handler_rep_.suspend_handler_i (handle, changes_required);
if (changes_required)
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return result;
}
@@ -536,15 +536,15 @@ ACE_WFMO_Reactor::suspend_handler (const ACE_Handle_Set &handles)
int changes_required = 0;
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
if (this->handler_rep_.suspend_handler_i (h, changes_required) == -1)
return -1;
-
+
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return 0;
}
@@ -554,20 +554,20 @@ ACE_WFMO_Reactor::suspend_handlers (void)
int error = 0;
int result = 0;
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
int changes_required = 0;
int total_handles = this->handler_rep_.max_handlep1_ - 1;
for (int i = 0; i < total_handles && error == 0; i++)
- {
+ {
result = this->handler_rep_.suspend_handler_i (this->handler_rep_.current_handles_[i], changes_required);
if (result == -1)
- error = 1;
+ error = 1;
}
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return error ? -1 : 0;
}
@@ -575,15 +575,15 @@ ACE_INLINE int
ACE_WFMO_Reactor::resume_handler (ACE_HANDLE handle)
{
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
int changes_required = 0;
int result = this->handler_rep_.resume_handler_i (handle, changes_required);
if (changes_required)
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return result;
}
@@ -601,15 +601,15 @@ ACE_WFMO_Reactor::resume_handler (const ACE_Handle_Set &handles)
int changes_required = 0;
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
if (this->handler_rep_.resume_handler_i (h, changes_required) == -1)
return -1;
-
+
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return 0;
}
@@ -619,20 +619,20 @@ ACE_WFMO_Reactor::resume_handlers (void)
int error = 0;
int result = 0;
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
+
int changes_required = 0;
for (size_t i = 0; i < this->handler_rep_.suspended_handles_ && error == 0; i++)
- {
- result = this->handler_rep_.resume_handler_i (this->handler_rep_.current_suspended_info_[i].event_handle_,
- changes_required);
+ {
+ result = this->handler_rep_.resume_handler_i (this->handler_rep_.current_suspended_info_[i].event_handle_,
+ changes_required);
if (result == -1)
- error = 1;
+ error = 1;
}
// Wake up all threads in WaitForMultipleObjects so that they can
// reconsult the handle set
- this->wakeup_all_threads ();
-
+ this->wakeup_all_threads ();
+
return error ? -1 : 0;
}
@@ -676,7 +676,7 @@ ACE_WFMO_Reactor::owner (ACE_thread_t *t)
return 0;
}
-ACE_INLINE ACE_thread_t
+ACE_INLINE ACE_thread_t
ACE_WFMO_Reactor::owner_i (void)
{
return this->owner_;
@@ -718,7 +718,7 @@ ACE_WFMO_Reactor::safe_dispatch (int wait_status)
int result = -1;
ACE_SEH_TRY
{
- result = this->dispatch (wait_status);
+ result = this->dispatch (wait_status);
}
ACE_SEH_FINALLY
{
@@ -734,53 +734,53 @@ ACE_WFMO_Reactor::wakeup_all_threads (void)
this->wakeup_all_threads_.signal ();
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::notify (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *timeout)
+ ACE_Reactor_Mask mask,
+ ACE_Time_Value *timeout)
{
return this->notify_handler_.notify (event_handler, mask, timeout);
}
ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
- ACE_Sig_Action *old_disp)
+ACE_WFMO_Reactor::register_handler (int signum,
+ ACE_Event_Handler *new_sh,
+ ACE_Sig_Action *new_disp,
+ ACE_Event_Handler **old_sh,
+ ACE_Sig_Action *old_disp)
{
- return this->signal_handler_->register_handler (signum,
- new_sh, new_disp,
- old_sh, old_disp);
+ return this->signal_handler_->register_handler (signum,
+ new_sh, new_disp,
+ old_sh, old_disp);
}
ACE_INLINE int
ACE_WFMO_Reactor::register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp)
+ ACE_Event_Handler *new_sh,
+ ACE_Sig_Action *new_disp)
{
int result = 0;
-#if (NSIG > 0)
- for (int s = 1; s < NSIG; s++)
+#if (ACE_NSIG > 0)
+ for (int s = 1; s < ACE_NSIG; s++)
if (sigset.is_member (s)
&& this->signal_handler_->register_handler (s, new_sh,
- new_disp) == -1)
+ new_disp) == -1)
result = -1;
#else
ACE_UNUSED_ARG (sigset);
ACE_UNUSED_ARG (new_sh);
ACE_UNUSED_ARG (new_disp);
-#endif /* NSIG */
+#endif /* ACE_NSIG */
return result;
}
ACE_INLINE int
-ACE_WFMO_Reactor::remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp,
- int sigkey)
+ACE_WFMO_Reactor::remove_handler (int signum,
+ ACE_Sig_Action *new_disp,
+ ACE_Sig_Action *old_disp,
+ int sigkey)
{
return this->signal_handler_->remove_handler (signum, new_disp, old_disp, sigkey);
}
@@ -790,15 +790,15 @@ ACE_WFMO_Reactor::remove_handler (const ACE_Sig_Set &sigset)
{
int result = 0;
-#if (NSIG > 0)
- for (int s = 1; s < NSIG; s++)
+#if (ACE_NSIG > 0)
+ for (int s = 1; s < ACE_NSIG; s++)
if (sigset.is_member (s)
&& this->signal_handler_->remove_handler (s) == -1)
result = -1;
#else
ACE_UNUSED_ARG (sigset);
-#endif /* NSIG */
-
+#endif /* ACE_NSIG */
+
return result;
}
@@ -814,65 +814,65 @@ ACE_WFMO_Reactor::handler (int signum, ACE_Event_Handler **eh)
return 0;
}
-ACE_INLINE void
+ACE_INLINE void
ACE_WFMO_Reactor::requeue_position (int)
{
// Not implemented
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::requeue_position (void)
{
// Don't have an implementation for this yet...
ACE_NOTSUP_RETURN (-1);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::mask_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops)
+ ACE_Reactor_Mask mask,
+ int ops)
{
// Don't have an implementation for this yet...
ACE_NOTSUP_RETURN (-1);
}
-ACE_INLINE int
-ACE_WFMO_Reactor::mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops)
-{
+ACE_INLINE int
+ACE_WFMO_Reactor::mask_ops (ACE_HANDLE handle,
+ ACE_Reactor_Mask mask,
+ int ops)
+{
// Don't have an implementation for this yet...
ACE_NOTSUP_RETURN (-1);
}
-ACE_INLINE int
-ACE_WFMO_Reactor::ready_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops)
+ACE_INLINE int
+ACE_WFMO_Reactor::ready_ops (ACE_Event_Handler *event_handler,
+ ACE_Reactor_Mask mask,
+ int ops)
{
// Don't have an implementation for this yet...
ACE_NOTSUP_RETURN (-1);
}
-ACE_INLINE int
-ACE_WFMO_Reactor::ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask,
- int ops)
+ACE_INLINE int
+ACE_WFMO_Reactor::ready_ops (ACE_HANDLE handle,
+ ACE_Reactor_Mask,
+ int ops)
{
// Don't have an implementation for this yet...
ACE_NOTSUP_RETURN (-1);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler)
+ ACE_Reactor_Mask mask,
+ ACE_Event_Handler **event_handler)
{
// Don't have an implementation for this yet...
ACE_NOTSUP_RETURN (-1);
}
-ACE_INLINE int
+ACE_INLINE int
ACE_WFMO_Reactor::initialized (void)
{
return this->open_for_business_;
@@ -884,7 +884,7 @@ ACE_WFMO_Reactor::lock (void)
return this->lock_adapter_;
}
-ACE_INLINE size_t
+ACE_INLINE size_t
ACE_WFMO_Reactor::size (void)
{
// Size of repository minus the 2 used for internal purposes
diff --git a/tests/Sigset_Ops_Test.cpp b/tests/Sigset_Ops_Test.cpp
index 18e1f8a1f2e..260b6985f4d 100644
--- a/tests/Sigset_Ops_Test.cpp
+++ b/tests/Sigset_Ops_Test.cpp
@@ -4,31 +4,31 @@
//
// = LIBRARY
// tests
-//
+//
// = FILENAME
// Sigset_Ops_Test.cpp
//
// = DESCRIPTION
-// This program tests the correctness of following functions.
+// This program tests the correctness of following functions.
// sigfillset(), sigemptyset(), sigaddset(), sigdelset(),
-// sigismember().
+// sigismember().
//
// = AUTHOR
// Nanbor Wang
-//
+//
// ============================================================================
#include "test_config.h"
#include "ace/OS.h"
-void
-siglistset(sigset_t x, int *sigset)
+void
+siglistset(sigset_t x, int *sigset)
{
int empty = 1 ;
int retv = 0 ;
ACE_DEBUG ((LM_DEBUG, "Signal(s) in the set = %08x:\n ", x)) ;
- for (int i = 1; i < NSIG; i++) {
+ for (int i = 1; i < ACE_NSIG; i++) {
if ((retv = ACE_OS::sigismember (&x, i)) > 0) {
ACE_DEBUG ((LM_DEBUG, " %d", i)) ;
empty = 0 ;
@@ -43,7 +43,7 @@ siglistset(sigset_t x, int *sigset)
}
}
-int
+int
main (int, char *[])
{
ACE_START_TEST ("Sigset_Ops_Test");
@@ -54,22 +54,22 @@ main (int, char *[])
ACE_DEBUG ((LM_DEBUG, "%n uses platform's native sigset*() functions.\n\n")) ;
#endif
- sigset_t x ; // examined sigset
- int sigset [NSIG] ; // a comparison sigset
+ sigset_t x ; // examined sigset
+ int sigset [ACE_NSIG] ; // a comparison sigset
int i ;
- int status = 0; // 0 is success, else fail code
+ int status = 0; // 0 is success, else fail code
// Two test signal numbers. I choose these low value signals to
- // avoid exceeding the NSIG range.
+ // avoid exceeding the ACE_NSIG range.
const int tsig1 = 5 ;
const int tsig2 = 8 ;
- // Testing sigfillset
+ // Testing sigfillset
ACE_OS::sigfillset (&x) ;
// fill the comparison set
- for (i = 0 ; i < NSIG ; i++) {
+ for (i = 0 ; i < ACE_NSIG ; i++) {
sigset [i] = 1 ;
}
siglistset (x, sigset) ;
@@ -78,7 +78,7 @@ main (int, char *[])
ACE_OS::sigemptyset (&x) ;
// empty the comparison set
- for (i = 0 ; i < NSIG ; i++) {
+ for (i = 0 ; i < ACE_NSIG ; i++) {
sigset [i] = 0 ;
}
siglistset (x, sigset) ;
@@ -104,7 +104,7 @@ main (int, char *[])
siglistset(x, sigset) ;
// Now testing out of bound signal
- if (ACE_OS::sigismember (&x, NSIG) >= 0) {
+ if (ACE_OS::sigismember (&x, ACE_NSIG) >= 0) {
ACE_ERROR((LM_ERROR, "Platform doesn't check for valid signal number.\n"));
status = 1;
}
@@ -113,10 +113,10 @@ main (int, char *[])
status = 1;
}
- /* Skip this test at this moment
+ /* Skip this test at this moment
// Test if platform can catch invalid sigset error
- // Currently, I can only think of passing a NULL ptr
- // If you know other situations that fall into this
+ // Currently, I can only think of passing a NULL ptr
+ // If you know other situations that fall into this
// catagory, please let me know. Thanks.
ACE_DEBUG ((LM_ERROR, "Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n")) ;