Panda3D
 All Classes Functions Variables Enumerations
lightMutexHolder.h
00001 // Filename: lightMutexHolder.h
00002 // Created by:  drose (08Oct08)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef LIGHTMUTEXHOLDER_H
00016 #define LIGHTMUTEXHOLDER_H
00017 
00018 #include "pandabase.h"
00019 #include "lightMutex.h"
00020 
00021 class Thread;
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //       Class : LightMutexHolder
00025 // Description : Similar to MutexHolder, but for a light mutex.
00026 ////////////////////////////////////////////////////////////////////
00027 class EXPCL_PANDA_PIPELINE LightMutexHolder {
00028 public:
00029   INLINE LightMutexHolder(const LightMutex &mutex);
00030   INLINE LightMutexHolder(LightMutex *&mutex);
00031   INLINE ~LightMutexHolder();
00032 private:
00033   INLINE LightMutexHolder(const LightMutexHolder &copy);
00034   INLINE void operator = (const LightMutexHolder &copy);
00035 
00036 private:
00037 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
00038   const LightMutex *_mutex;
00039 #endif
00040 };
00041 
00042 #include "lightMutexHolder.I"
00043 
00044 #endif
 All Classes Functions Variables Enumerations