Document return values
[ACE_TAO.git] / ACE / ace / Thread_Semaphore.cpp
blob41eabea789a252fa5ed5f89fa3c399bd7eed845d
1 /**
2 * @file Thread_Semaphore.cpp
4 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
5 */
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__ */
19 #include "ace/ACE.h"
21 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
23 ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Semaphore)
25 void
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,
37 void *arg,
38 int max)
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;
50 if (name == 0)
51 ACE_NEW_RETURN (p, ACE_Thread_Semaphore (1, name), 0);
52 else
53 ACE_NEW_RETURN (p, ACE_Thread_Semaphore (1, ACE::basename (name,
54 ACE_DIRECTORY_SEPARATOR_CHAR)),
55 0);
56 return p;
59 ACE_END_VERSIONED_NAMESPACE_DECL
61 #endif /* ACE_HAS_THREADS */