00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef REMUTEXHOLDER_H
00016 #define REMUTEXHOLDER_H
00017
00018 #include "pandabase.h"
00019 #include "reMutex.h"
00020
00021 class Thread;
00022
00023
00024
00025
00026
00027 class EXPCL_PANDA_PIPELINE ReMutexHolder {
00028 public:
00029 INLINE ReMutexHolder(const ReMutex &mutex);
00030 INLINE ReMutexHolder(const ReMutex &mutex, Thread *current_thread);
00031 INLINE ReMutexHolder(ReMutex *&mutex);
00032 INLINE ~ReMutexHolder();
00033 private:
00034 INLINE ReMutexHolder(const ReMutexHolder ©);
00035 INLINE void operator = (const ReMutexHolder ©);
00036
00037 private:
00038 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
00039 const ReMutex *_mutex;
00040 #endif
00041 };
00042
00043 #include "reMutexHolder.I"
00044
00045 #endif