mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Imported MaNGOS revision 6767 from http://mangos.svn.sourceforge.net/svnroot/mangos/trunk/
This commit is contained in:
parent
d767495d5b
commit
800ee76535
3322 changed files with 903437 additions and 0 deletions
62
dep/ACE_wrappers/ace/Semaphore.cpp
Normal file
62
dep/ACE_wrappers/ace/Semaphore.cpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
// $Id: Semaphore.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
|
||||
#include "ace/Semaphore.h"
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Semaphore.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
#include "ace/Log_Msg.h"
|
||||
#include "ace/ACE.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Semaphore,
|
||||
"$Id: Semaphore.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_ALLOC_HOOK_DEFINE(ACE_Semaphore)
|
||||
|
||||
void
|
||||
ACE_Semaphore::dump (void) const
|
||||
{
|
||||
// ACE_TRACE ("ACE_Semaphore::dump");
|
||||
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
|
||||
}
|
||||
|
||||
ACE_Semaphore::ACE_Semaphore (unsigned int count,
|
||||
int type,
|
||||
const ACE_TCHAR *name,
|
||||
void *arg,
|
||||
int max)
|
||||
: removed_ (false)
|
||||
{
|
||||
// ACE_TRACE ("ACE_Semaphore::ACE_Semaphore");
|
||||
#if defined(ACE_LACKS_UNNAMED_SEMAPHORE)
|
||||
// if the user does not provide a name, we generate a unique name here
|
||||
ACE_TCHAR iname[ACE_UNIQUE_NAME_LEN];
|
||||
if (name == 0)
|
||||
ACE::unique_name (this, iname, ACE_UNIQUE_NAME_LEN);
|
||||
if (ACE_OS::sema_init (&this->semaphore_, count, type,
|
||||
name ? name : iname,
|
||||
arg, max) != 0)
|
||||
#else
|
||||
if (ACE_OS::sema_init (&this->semaphore_, count, type,
|
||||
name, arg, max) != 0)
|
||||
#endif
|
||||
ACE_ERROR ((LM_ERROR,
|
||||
ACE_TEXT ("%p\n"),
|
||||
ACE_TEXT ("ACE_Semaphore::ACE_Semaphore")));
|
||||
}
|
||||
|
||||
ACE_Semaphore::~ACE_Semaphore (void)
|
||||
{
|
||||
// ACE_TRACE ("ACE_Semaphore::~ACE_Semaphore");
|
||||
|
||||
this->remove ();
|
||||
}
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
Loading…
Add table
Add a link
Reference in a new issue