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