aboutsummaryrefslogtreecommitdiff
path: root/externals/ace/Process_Semaphore.inl
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-20 02:49:28 +0200
committerXanadu <none@none>2010-07-20 02:49:28 +0200
commit79622802f397258ee0f34327ba3ae6977ca3e7ff (patch)
tree1868946c234ab9ee256a6b7766a15713eae94235 /externals/ace/Process_Semaphore.inl
parent7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff)
parentf906976837502fa5aa81b982b901d1509f5aa0c4 (diff)
Merge. Revision history for source files should be all back now.
--HG-- branch : trunk rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'externals/ace/Process_Semaphore.inl')
-rw-r--r--externals/ace/Process_Semaphore.inl66
1 files changed, 66 insertions, 0 deletions
diff --git a/externals/ace/Process_Semaphore.inl b/externals/ace/Process_Semaphore.inl
new file mode 100644
index 00000000000..0874b2d51dd
--- /dev/null
+++ b/externals/ace/Process_Semaphore.inl
@@ -0,0 +1,66 @@
+// -*- C++ -*-
+//
+// $Id: Process_Semaphore.inl 80826 2008-03-04 14:51:23Z wotte $
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
+ACE_INLINE const ACE_sema_t &
+ACE_Process_Semaphore::lock (void) const
+{
+// ACE_TRACE ("ACE_Process_Semaphore::lock");
+ return this->lock_.lock ();
+}
+#endif /* ACE_WIN32 || ACE_HAS_POSIX_SEM */
+
+// Acquire semaphore ownership. This calls <acquire> and is only here
+// to make the ACE_Process_Semaphore interface consistent with the
+// other synchronization APIs.
+
+ACE_INLINE int
+ACE_Process_Semaphore::acquire_read (void)
+{
+ return this->acquire ();
+}
+
+// Acquire semaphore ownership. This calls <acquire> and is only here
+// to make the ACE_Process_Semaphore interface consistent with the
+// other synchronization APIs.
+
+ACE_INLINE int
+ACE_Process_Semaphore::acquire_write (void)
+{
+ return this->acquire ();
+}
+
+// Conditionally acquire semaphore (i.e., won't block). This calls
+// <tryacquire> and is only here to make the ACE_Process_Semaphore
+// interface consistent with the other synchronization APIs.
+
+ACE_INLINE int
+ACE_Process_Semaphore::tryacquire_read (void)
+{
+ return this->tryacquire ();
+}
+
+// Conditionally acquire semaphore (i.e., won't block). This calls
+// <tryacquire> and is only here to make the ACE_Process_Semaphore
+// interface consistent with the other synchronization APIs.
+
+ACE_INLINE int
+ACE_Process_Semaphore::tryacquire_write (void)
+{
+ return this->tryacquire ();
+}
+
+// This is only here to make the ACE_Process_Semaphore
+// interface consistent with the other synchronization APIs.
+// Assumes the caller has already acquired the semaphore using one of
+// the above calls, and returns 0 (success) always.
+ACE_INLINE int
+ACE_Process_Semaphore::tryacquire_write_upgrade (void)
+{
+ return 0;
+}
+
+ACE_END_VERSIONED_NAMESPACE_DECL