summaryrefslogtreecommitdiff
path: root/ace/SV_Semaphore_Complex.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/SV_Semaphore_Complex.h')
-rw-r--r--ace/SV_Semaphore_Complex.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/ace/SV_Semaphore_Complex.h b/ace/SV_Semaphore_Complex.h
index de48fc09359..6278fb694c9 100644
--- a/ace/SV_Semaphore_Complex.h
+++ b/ace/SV_Semaphore_Complex.h
@@ -1,4 +1,4 @@
-// -*- C++ -*-
+/* -*- C++ -*- */
//=============================================================================
/**
@@ -20,8 +20,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
/**
* @class ACE_SV_Semaphore_Complex
*
@@ -63,32 +61,32 @@ public:
// = Initialization and termination methods.
ACE_SV_Semaphore_Complex (void);
ACE_SV_Semaphore_Complex (key_t key,
- short create = ACE_SV_Semaphore_Complex::ACE_CREATE,
+ int create = ACE_SV_Semaphore_Complex::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- mode_t perms = ACE_DEFAULT_FILE_PERMS);
+ int perms = ACE_DEFAULT_FILE_PERMS);
ACE_SV_Semaphore_Complex (const char *name,
- short create = ACE_SV_Semaphore_Complex::ACE_CREATE,
+ int create = ACE_SV_Semaphore_Complex::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- mode_t perms = ACE_DEFAULT_FILE_PERMS);
+ int perms = ACE_DEFAULT_FILE_PERMS);
~ACE_SV_Semaphore_Complex (void);
/// Open or create an array of SV_Semaphores. We return 0 if all is
/// OK, else -1.
int open (const char *name,
- short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- mode_t perms = ACE_DEFAULT_FILE_PERMS);
+ int perms = ACE_DEFAULT_FILE_PERMS);
/// Open or create an array of SV_Semaphores. We return 0 if all is
/// OK, else -1.
int open (key_t key,
- short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- mode_t perms = ACE_DEFAULT_FILE_PERMS);
+ int perms = ACE_DEFAULT_FILE_PERMS);
/**
* Close an ACE_SV_Semaphore. Unlike the <remove> method, this
@@ -102,28 +100,28 @@ public:
// = Semaphore acquire and release methods.
/// Acquire the semaphore.
- int acquire (u_short n = 0, short flags = 0) const;
+ int acquire (u_short n = 0, int flags = 0) const;
/// Acquire a semaphore for reading.
- int acquire_read (u_short n = 0, short flags = 0) const;
+ int acquire_read (u_short n = 0, int flags = 0) const;
/// Acquire a semaphore for writing
- int acquire_write (u_short n = 0, short flags = 0) const;
+ int acquire_write (u_short n = 0, int flags = 0) const;
/// Try to acquire the semaphore.
- int tryacquire (u_short n = 0, short flags = 0) const;
+ int tryacquire (u_short n = 0, int flags = 0) const;
/// Try to acquire the semaphore for reading.
- int tryacquire_read (u_short n = 0, short flags = 0) const;
+ int tryacquire_read (u_short n = 0, int flags = 0) const;
/// Try to acquire the semaphore for writing.
- int tryacquire_write (u_short n = 0, short flags = 0) const;
+ int tryacquire_write (u_short n = 0, int flags = 0) const;
/// Release the semaphore.
- int release (u_short n = 0, short flags = 0) const;
+ int release (u_short n = 0, int flags = 0) const;
// = Semaphore operation methods.
- int op (short val, u_short n = 0, short flags = 0) const;
+ int op (int val, u_short n = 0, int flags = 0) const;
int op (sembuf op_vec[], u_short n) const;
// = Semaphore control methods.
@@ -131,8 +129,8 @@ public:
int control (int cmd, int value = 0, u_short n = 0) const;
// = Upgrade access control...
- using ACE_SV_Semaphore_Simple::get_id;
- using ACE_SV_Semaphore_Simple::remove;
+ ACE_USING ACE_SV_Semaphore_Simple::get_id;
+ ACE_USING ACE_SV_Semaphore_Simple::remove;
/// Dump the state of an object.
void dump (void) const;
@@ -149,8 +147,6 @@ private:
static sembuf op_unlock_[1];
};
-ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/SV_Semaphore_Complex.inl"
#endif /* __ACE_INLINE__ */