1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/* -*- C++ -*- */
/**
* @file Thread_Semaphore.cpp
*
* $Id$
*
* Originally in Synch.cpp
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
#include "ace/Thread_Semaphore.h"
#if defined (ACE_HAS_THREADS)
#if !defined (__ACE_INLINE__)
#include "ace/Thread_Semaphore.inl"
#endif /* __ACE_INLINE__ */
#include "ace/ACE.h"
ACE_RCSID(ace, Thread_Semaphore, "$Id$")
void
ACE_Thread_Semaphore::dump (void) const
{
#if defined (ACE_HAS_DUMP)
// ACE_TRACE ("ACE_Thread_Semaphore::dump");
ACE_Semaphore::dump ();
#endif /* ACE_HAS_DUMP */
}
ACE_Thread_Semaphore::ACE_Thread_Semaphore (unsigned int count,
const ACE_TCHAR *name,
void *arg,
int max)
: ACE_Semaphore (count, USYNC_THREAD, name, arg, max)
{
// ACE_TRACE ("ACE_Thread_Semaphore::ACE_Thread_Semaphore");
}
/*****************************************************************************/
ACE_Thread_Semaphore *
ACE_Malloc_Lock_Adapter_T<ACE_Thread_Semaphore>::operator () (const ACE_TCHAR *name)
{
ACE_Thread_Semaphore *p = 0;
if (name == 0)
ACE_NEW_RETURN (p, ACE_Thread_Semaphore (1, name), 0);
else
ACE_NEW_RETURN (p, ACE_Thread_Semaphore (1, ACE::basename (name,
ACE_DIRECTORY_SEPARATOR_CHAR)),
0);
return p;
}
#endif /* ACE_HAS_THREADS */
|