diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
commit | 99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch) | |
tree | bda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/ace/Thread_Semaphore.cpp | |
parent | c4078c377d74290ebe4e66da0b4975da91732376 (diff) | |
download | ATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz |
undoing accidental deletion
Diffstat (limited to 'ACE/ace/Thread_Semaphore.cpp')
-rw-r--r-- | ACE/ace/Thread_Semaphore.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/ACE/ace/Thread_Semaphore.cpp b/ACE/ace/Thread_Semaphore.cpp new file mode 100644 index 00000000000..741c7c5ec99 --- /dev/null +++ b/ACE/ace/Thread_Semaphore.cpp @@ -0,0 +1,62 @@ +/** + * @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$") + + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +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; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_THREADS */ |