2 * @file Thread_Semaphore.cpp
4 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
7 #include "ace/Thread_Semaphore.h"
9 #if defined (ACE_HAS_THREADS)
11 #if defined (ACE_HAS_ALLOC_HOOKS)
12 # include "ace/Malloc_Base.h"
13 #endif /* ACE_HAS_ALLOC_HOOKS */
15 #if !defined (__ACE_INLINE__)
16 #include "ace/Thread_Semaphore.inl"
17 #endif /* __ACE_INLINE__ */
21 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
23 ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Semaphore
)
26 ACE_Thread_Semaphore::dump () const
28 #if defined (ACE_HAS_DUMP)
29 // ACE_TRACE ("ACE_Thread_Semaphore::dump");
31 ACE_Semaphore::dump ();
32 #endif /* ACE_HAS_DUMP */
35 ACE_Thread_Semaphore::ACE_Thread_Semaphore (unsigned int count
,
36 const ACE_TCHAR
*name
,
39 : ACE_Semaphore (count
, USYNC_THREAD
, name
, arg
, max
)
41 // ACE_TRACE ("ACE_Thread_Semaphore::ACE_Thread_Semaphore");
44 /*****************************************************************************/
46 ACE_Thread_Semaphore
*
47 ACE_Malloc_Lock_Adapter_T
<ACE_Thread_Semaphore
>::operator () (const ACE_TCHAR
*name
)
49 ACE_Thread_Semaphore
*p
= 0;
51 ACE_NEW_RETURN (p
, ACE_Thread_Semaphore (1, name
), 0);
53 ACE_NEW_RETURN (p
, ACE_Thread_Semaphore (1, ACE::basename (name
,
54 ACE_DIRECTORY_SEPARATOR_CHAR
)),
59 ACE_END_VERSIONED_NAMESPACE_DECL
61 #endif /* ACE_HAS_THREADS */