00001 // Filename: mutexTrueImpl.h 00002 // Created by: drose (19Jun07) 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 MUTEXTRUEIMPL_H 00016 #define MUTEXTRUEIMPL_H 00017 00018 #include "pandabase.h" 00019 #include "mutexImpl.h" 00020 00021 // The MutexTrueImpl typedef is given here in the pipeline directory, 00022 // and is used to implement Mutex and ReMutex (and, therefore, any 00023 // downstream Mutex implementation). 00024 00025 // This is slightly different from the MutexImpl typedef, which is 00026 // given up in dtoolbase, and is used standalone anywhere very 00027 // low-level code needs to protect itself from mutual exclusion. 00028 00029 // The only difference between the two is in the case of 00030 // THREAD_SIMPLE_IMPL. In this case, MutexImpl maps to 00031 // MutexDummyImpl, while MutexTrueImpl maps to MutexSimpleImpl. This 00032 // distinction is necessary because we cannot define MutexSimpleImpl 00033 // until we have defined the whole ThreadSimpleManager and related 00034 // infrastructure. 00035 00036 #ifdef THREAD_SIMPLE_IMPL 00037 00038 #include "mutexSimpleImpl.h" 00039 typedef MutexSimpleImpl MutexTrueImpl; 00040 #undef HAVE_REMUTEXTRUEIMPL 00041 00042 #else // THREAD_SIMPLE_IMPL 00043 00044 typedef MutexImpl MutexTrueImpl; 00045 #if HAVE_REMUTEXIMPL 00046 typedef ReMutexImpl ReMutexTrueImpl; 00047 #define HAVE_REMUTEXTRUEIMPL 1 00048 #else 00049 #undef HAVE_REMUTEXTRUEIMPL 00050 #endif // HAVE_REMUTEXIMPL 00051 00052 #endif // THREAD_SIMPLE_IMPL 00053 00054 #endif 00055 00056 00057