diff options
Diffstat (limited to 'ace/SV_Semaphore_Simple.inl')
-rw-r--r-- | ace/SV_Semaphore_Simple.inl | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ace/SV_Semaphore_Simple.inl b/ace/SV_Semaphore_Simple.inl index 46122d4e140..81a828b4401 100644 --- a/ace/SV_Semaphore_Simple.inl +++ b/ace/SV_Semaphore_Simple.inl @@ -1,19 +1,20 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SV_Semaphore_Simple.i - #include "ace/Global_Macros.h" #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Semaphores don't offer wide-char names, so convert the name and forward // to the narrow-char open(). ACE_INLINE int ACE_SV_Semaphore_Simple::open (const wchar_t *name, - int flags, + short flags, int initial_value, u_short nsems, - int perms) + mode_t perms) { ACE_TRACE ("ACE_SV_Semaphore_Simple::open (wchar_t)"); return this->open (ACE_TEXT_TO_CHAR_IN (name), @@ -25,8 +26,8 @@ ACE_SV_Semaphore_Simple::open (const wchar_t *name, ACE_INLINE int ACE_SV_Semaphore_Simple::control (int cmd, - semun arg, - u_short n) const + semun arg, + u_short n) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::control"); return this->internal_id_ == -1 ? @@ -58,21 +59,21 @@ ACE_SV_Semaphore_Simple::op (sembuf op_vec[], u_short n) const // DOWN operation. ACE_INLINE int -ACE_SV_Semaphore_Simple::acquire (u_short n, int flags) const +ACE_SV_Semaphore_Simple::acquire (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire"); return this->op (-1, n, flags); } ACE_INLINE int -ACE_SV_Semaphore_Simple::acquire_read (u_short n, int flags) const +ACE_SV_Semaphore_Simple::acquire_read (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire_read"); return this->acquire (n, flags); } ACE_INLINE int -ACE_SV_Semaphore_Simple::acquire_write (u_short n, int flags) const +ACE_SV_Semaphore_Simple::acquire_write (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire_write"); return this->acquire (n, flags); @@ -81,7 +82,7 @@ ACE_SV_Semaphore_Simple::acquire_write (u_short n, int flags) const // Non-blocking version of acquire(). ACE_INLINE int -ACE_SV_Semaphore_Simple::tryacquire (u_short n, int flags) const +ACE_SV_Semaphore_Simple::tryacquire (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire"); return this->op (-1, n, flags | IPC_NOWAIT); @@ -90,7 +91,7 @@ ACE_SV_Semaphore_Simple::tryacquire (u_short n, int flags) const // Non-blocking version of acquire(). ACE_INLINE int -ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, int flags) const +ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire_read"); return this->tryacquire (n, flags); @@ -99,7 +100,7 @@ ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, int flags) const // Non-blocking version of acquire(). ACE_INLINE int -ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, int flags) const +ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire_write"); return this->tryacquire (n, flags); @@ -109,7 +110,7 @@ ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, int flags) const // Tannenbaums UP operation. ACE_INLINE int -ACE_SV_Semaphore_Simple::release (u_short n, int flags) const +ACE_SV_Semaphore_Simple::release (u_short n, short flags) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::release"); return this->op (1, n, flags); @@ -122,3 +123,4 @@ ACE_SV_Semaphore_Simple::get_id (void) const return this->internal_id_; } +ACE_END_VERSIONED_NAMESPACE_DECL |