diff options
author | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-08-04 03:53:54 +0000 |
---|---|---|
committer | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-08-04 03:53:54 +0000 |
commit | 5bef9626a3ab5e70fe002f3237761150a5e59787 (patch) | |
tree | 12103be26b2e9b0cd1869d7fd72a1f8a8ec362e6 /ace/Token.h | |
parent | 4ca7b649a73214d4cbbac1e739436bf60a370f83 (diff) | |
download | ATCD-5bef9626a3ab5e70fe002f3237761150a5e59787.tar.gz |
ChangeLogTag:Mon Aug 4 03:26:30 UTC 2003 Don Hinton <dhinton@dresystems.com>
Diffstat (limited to 'ace/Token.h')
-rw-r--r-- | ace/Token.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/ace/Token.h b/ace/Token.h index 958708e1a51..786ada3f474 100644 --- a/ace/Token.h +++ b/ace/Token.h @@ -17,7 +17,7 @@ #define ACE_TOKEN_H #include /**/ "ace/pre.h" -#include "ace/Synch.h" +#include "ace/ACE_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -25,6 +25,19 @@ #if defined (ACE_HAS_THREADS) +#include "ace/OS.h" +#include "ace/Null_Mutex.h" + +#if defined (ACE_TOKEN_USES_SEMAPHORE) +# include "ace/Semaphore.h" +#else +# include "ace/Condition_Thread_Mutex.h" +#endif /* ACE_TOKEN_USES_SEMAPHORE */ + +class ACE_Thread_Mutex; +class ACE_Time_Value; +//class ACE_Condition_Attributes; + #if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || defined (VXWORKS) || defined (ACE_PSOS) // If platforms support semaphores with timed wait, then we use semaphores instead of c.v. # define ACE_TOKEN_USES_SEMAPHORE @@ -298,10 +311,35 @@ private: int queueing_strategy_; }; +class ACE_Export ACE_Noop_Token : public ACE_Null_Mutex +{ +public: + /// Queueing strategy + enum QUEUEING_STRATEGY + { + FIFO = -1, + LIFO = 0 + }; + + /// Get queueing strategy. + int queueing_strategy (void); + + /// Set queueing strategy. + void queueing_strategy (int queueing_strategy); + + int renew (int = 0, ACE_Time_Value * =0); + + /// Dump the state of an object. + void dump (void) const; + + /// Declare the dynamic allocation hooks. + ACE_ALLOC_HOOK_DECLARE; +}; + #if defined (__ACE_INLINE__) -#include "ace/Synch_T.h" #include "ace/Token.i" #endif /* __ACE_INLINE__ */ + #else class ACE_Export ACE_Token { |