diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-06 20:00:50 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-06 20:00:50 +0000 |
commit | 53922097e4738f5f6d84cca15b4966cf9430d21f (patch) | |
tree | 43c695e7ba9a74c5074976d33867d212513ea082 /ace/Synch.h | |
parent | fadd61291f7a85632de493e4cd0fbb88026d43f4 (diff) | |
download | ATCD-53922097e4738f5f6d84cca15b4966cf9430d21f.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Synch.h')
-rw-r--r-- | ace/Synch.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/ace/Synch.h b/ace/Synch.h index c47f5d9c7df..59e395a9aa5 100644 --- a/ace/Synch.h +++ b/ace/Synch.h @@ -1442,4 +1442,70 @@ public: // Include the templates here. #include "ace/Synch_T.h" +template <class ACE_LOCK> +class ACE_Guard; + +class ACE_Export ACE_Guard<ACE_Null_Mutex> +{ + // = TITLE + // + // = DESCRIPTION + // +public: + // = Initialization and termination methods. + ACE_Guard (ACE_Null_Mutex &) {} + ACE_Guard (ACE_Null_Mutex &, int) {} + ~ACE_Guard (void) {} + + int acquire (void) { return 0; } + int tryacquire (void) { return 0; } + int release (void) { return 0; } + int locked (void) { return 1; } + int remove (void) { return 0; } + void dump (void) const {} + +private: + // = Prevent assignment and initialization. + ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Guard<ACE_Null_Mutex> &)) + ACE_UNIMPLEMENTED_FUNC (ACE_Guard (const ACE_Guard<ACE_Null_Mutex> &)) +}; + +template <class ACE_LOCK> +class ACE_Write_Guard; + +class ACE_Export ACE_Write_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex> +{ + // = TITLE +public: + ACE_Write_Guard (ACE_Null_Mutex &m) + : ACE_Guard<ACE_Null_Mutex> (m) {} + ACE_Write_Guard (ACE_Null_Mutex &m, int blocked) + : ACE_Guard<ACE_Null_Mutex> (m, blocked) {} + + int acquire_write (void) { return 0; } + int acquire (void) { return 0; } + int tryacquire_write (void) { return 0; } + int tryacquire (void) { return 0; } + void dump (void) const {} +}; + +template <class ACE_LOCK> +class ACE_Read_Guard; + +class ACE_Export ACE_Read_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex> +{ + // = TITLE +public: + ACE_Read_Guard (ACE_Null_Mutex &m) + : ACE_Guard<ACE_Null_Mutex> (m) {} + ACE_Read_Guard (ACE_Null_Mutex &m, int blocked) + : ACE_Guard<ACE_Null_Mutex> (m, blocked) {} + + int acquire_write (void) { return 0; } + int acquire (void) { return 0; } + int tryacquire_write (void) { return 0; } + int tryacquire (void) { return 0; } + void dump (void) const {} +}; + #endif /* ACE_SYNCH_H */ |