NAME
ACE_Recursive_Mutex -
Implement a C++ wrapper that allows calls to class ACE_Mutex
to be nested for a nested acquire() that occurs in the same
thread.
SYNOPSIS
#include <ace/Synch.h>
class ACE_Recursive_Mutex
{
public:
ACE_Recursive_Mutex (
int type = USYNC_THREAD,
const char *name = 0,
void *arg = 0
);
~ACE_Recursive_Mutex (void);
int remove (void);
int acquire (void);
int tryacquire (void);
int release (void);
ACE_Mutex &lock (void);
thread_t get_thread_id (void);
int get_nesting_level (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
void set_nesting_level (int d);
void set_thread_id (thread_t t);
ACE_Mutex lock_;
ACE_Mutex nesting_mutex_;
int nesting_level_;
thread_t thr_id_;
inline void operator= (const ACE_Recursive_Mutex &);
inline ACE_Recursive_Mutex (const ACE_Recursive_Mutex &);
};
DESCRIPTION
Wrappers for various synchronization routines.
Prevent assignment and initialization.
inline void operator= (const ACE_Recursive_Mutex &);
inline ACE_Recursive_Mutex (const ACE_Recursive_Mutex &);
AUTHOR
Doug Schmidt
LIBRARY
ace