[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Semaphore.cpp
blobb3d6c6638ff32a9c0985fc15e14098c31f2d270d
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"
10 #include "ace/ACE.h"
12 ACE_RCSID (ace,
13 Semaphore,
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)
20 void
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,
31 int type,
32 const ACE_TCHAR *name,
33 void *arg,
34 int max)
35 : removed_ (false)
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];
41 if (name == 0)
42 ACE::unique_name (this, iname, ACE_UNIQUE_NAME_LEN);
43 if (ACE_OS::sema_init (&this->semaphore_, count, type,
44 name ? name : iname,
45 arg, max) != 0)
46 #else
47 if (ACE_OS::sema_init (&this->semaphore_, count, type,
48 name, arg, max) != 0)
49 #endif
50 ACE_ERROR ((LM_ERROR,
51 ACE_TEXT ("%p\n"),
52 ACE_TEXT ("ACE_Semaphore::ACE_Semaphore")));
55 ACE_Semaphore::~ACE_Semaphore (void)
57 // ACE_TRACE ("ACE_Semaphore::~ACE_Semaphore");
59 this->remove ();
62 ACE_END_VERSIONED_NAMESPACE_DECL