diff options
Diffstat (limited to 'ace/Null_Barrier.h')
-rw-r--r-- | ace/Null_Barrier.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/ace/Null_Barrier.h b/ace/Null_Barrier.h new file mode 100644 index 00000000000..b08016b79f6 --- /dev/null +++ b/ace/Null_Barrier.h @@ -0,0 +1,58 @@ +// -*- C++ -*- + +//========================================================================== +/** + * @file Null_Barrier.h + * + * $Id$ + * + * Moved from Synch.h. + * + * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> + */ +//========================================================================== + +#ifndef ACE_NULL_BARRIER_H +#define ACE_NULL_BARRIER_H +#include /**/ "ace/pre.h" + +#include "ace/ACE_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +/** + * @class ACE_Null_Barrier + * + * @brief Implements "NULL barrier synchronization". + */ +class ACE_Export ACE_Null_Barrier +{ +public: + /// Initialize the barrier to synchronize <count> threads. + ACE_Null_Barrier (unsigned int, + const char * = 0, + void * = 0) {}; + + /// Default dtor. + ~ACE_Null_Barrier (void) {}; + + /// Block the caller until all <count> threads have called <wait> and + /// then allow all the caller threads to continue in parallel. + int wait (void) { return 0; }; + + /// Dump the state of an object. + void dump (void) const {}; + + /// Declare the dynamic allocation hooks. + //ACE_ALLOC_HOOK_DECLARE; + +private: + // = Prevent assignment and initialization. + void operator= (const ACE_Null_Barrier &); + ACE_Null_Barrier (const ACE_Null_Barrier &); +}; + +#include /**/ "ace/post.h" +#endif /* ACE_NULL_BARRIER_H */ |