1 // $Id: Semaphore.cpp 80826 2008-03-04 14:51:23Z wotte $
3 #include "ace/Semaphore.h"
5 #if !defined (__ACE_INLINE__)
6 #include "ace/Semaphore.inl"
7 #endif /* __ACE_INLINE__ */
9 #include "ace/Log_Msg.h"
14 "$Id: Semaphore.cpp 80826 2008-03-04 14:51:23Z wotte $")
16 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
18 ACE_ALLOC_HOOK_DEFINE(ACE_Semaphore
)
21 ACE_Semaphore::dump (void) const
23 // ACE_TRACE ("ACE_Semaphore::dump");
25 ACE_DEBUG ((LM_DEBUG
, ACE_BEGIN_DUMP
, this));
26 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("\n")));
27 ACE_DEBUG ((LM_DEBUG
, ACE_END_DUMP
));
30 ACE_Semaphore::ACE_Semaphore (unsigned int count
,
32 const ACE_TCHAR
*name
,
37 // ACE_TRACE ("ACE_Semaphore::ACE_Semaphore");
38 #if defined(ACE_LACKS_UNNAMED_SEMAPHORE)
39 // if the user does not provide a name, we generate a unique name here
40 ACE_TCHAR iname
[ACE_UNIQUE_NAME_LEN
];
42 ACE::unique_name (this, iname
, ACE_UNIQUE_NAME_LEN
);
43 if (ACE_OS::sema_init (&this->semaphore_
, count
, type
,
47 if (ACE_OS::sema_init (&this->semaphore_
, count
, type
,
52 ACE_TEXT ("ACE_Semaphore::ACE_Semaphore")));
55 ACE_Semaphore::~ACE_Semaphore (void)
57 // ACE_TRACE ("ACE_Semaphore::~ACE_Semaphore");
62 ACE_END_VERSIONED_NAMESPACE_DECL