Panda3D
 All Classes Functions Variables Enumerations
lightMutexDirect.I
00001 // Filename: lightMutexDirect.I
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 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: LightMutexDirect::Constructor
00018 //       Access: Protected
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE LightMutexDirect::
00022 LightMutexDirect() {
00023 }
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //     Function: LightMutexDirect::Destructor
00027 //       Access: Protected
00028 //  Description:
00029 ////////////////////////////////////////////////////////////////////
00030 INLINE LightMutexDirect::
00031 ~LightMutexDirect() {
00032 }
00033 
00034 ////////////////////////////////////////////////////////////////////
00035 //     Function: LightMutexDirect::Copy Constructor
00036 //       Access: Private
00037 //  Description: Do not attempt to copy lightMutexes.
00038 ////////////////////////////////////////////////////////////////////
00039 INLINE LightMutexDirect::
00040 LightMutexDirect(const LightMutexDirect &copy) {
00041   nassertv(false);
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //     Function: LightMutexDirect::Copy Assignment Operator
00046 //       Access: Private
00047 //  Description: Do not attempt to copy lightMutexes.
00048 ////////////////////////////////////////////////////////////////////
00049 INLINE void LightMutexDirect::
00050 operator = (const LightMutexDirect &copy) {
00051   nassertv(false);
00052 }
00053 
00054 ////////////////////////////////////////////////////////////////////
00055 //     Function: LightMutexDirect::acquire
00056 //       Access: Published
00057 //  Description: Grabs the lightMutex if it is available.  If it is not
00058 //               available, blocks until it becomes available, then
00059 //               grabs it.  In either case, the function does not
00060 //               return until the lightMutex is held; you should then call
00061 //               unlock().
00062 //
00063 //               This method is considered const so that you can lock
00064 //               and unlock const lightMutexes, mainly to allow thread-safe
00065 //               access to otherwise const data.
00066 //
00067 //               Also see LightMutexHolder.
00068 ////////////////////////////////////////////////////////////////////
00069 INLINE void LightMutexDirect::
00070 acquire() const {
00071   TAU_PROFILE("void LightMutexDirect::acquire()", " ", TAU_USER);
00072   ((LightMutexDirect *)this)->_impl.acquire();
00073 }
00074 
00075 ////////////////////////////////////////////////////////////////////
00076 //     Function: LightMutexDirect::release
00077 //       Access: Published
00078 //  Description: Releases the lightMutex.  It is an error to call this if
00079 //               the lightMutex was not already locked.
00080 //
00081 //               This method is considered const so that you can lock
00082 //               and unlock const lightMutexes, mainly to allow thread-safe
00083 //               access to otherwise const data.
00084 ////////////////////////////////////////////////////////////////////
00085 INLINE void LightMutexDirect::
00086 release() const {
00087   TAU_PROFILE("void LightMutexDirect::release()", " ", TAU_USER);
00088   ((LightMutexDirect *)this)->_impl.release();
00089 }
00090 
00091 ////////////////////////////////////////////////////////////////////
00092 //     Function: LightMutexDirect::debug_is_locked
00093 //       Access: Published
00094 //  Description: Returns true if the current thread has locked the
00095 //               LightMutex, false otherwise.  This method is only intended
00096 //               for use in debugging, hence the method name; in the
00097 //               LightMutexDirect case, it always returns true, since
00098 //               there's not a reliable way to determine this
00099 //               otherwise.
00100 ////////////////////////////////////////////////////////////////////
00101 INLINE bool LightMutexDirect::
00102 debug_is_locked() const {
00103   return true;
00104 }
00105 
00106 ////////////////////////////////////////////////////////////////////
00107 //     Function: LightMutexDirect::set_name
00108 //       Access: Public
00109 //  Description: The lightMutex name is only defined when compiling in
00110 //               DEBUG_THREADS mode.
00111 ////////////////////////////////////////////////////////////////////
00112 INLINE void LightMutexDirect::
00113 set_name(const string &) {
00114 }
00115 
00116 ////////////////////////////////////////////////////////////////////
00117 //     Function: LightMutexDirect::clear_name
00118 //       Access: Public
00119 //  Description: The lightMutex name is only defined when compiling in
00120 //               DEBUG_THREADS mode.
00121 ////////////////////////////////////////////////////////////////////
00122 INLINE void LightMutexDirect::
00123 clear_name() {
00124 }
00125 
00126 ////////////////////////////////////////////////////////////////////
00127 //     Function: LightMutexDirect::has_name
00128 //       Access: Public
00129 //  Description: The lightMutex name is only defined when compiling in
00130 //               DEBUG_THREADS mode.
00131 ////////////////////////////////////////////////////////////////////
00132 INLINE bool LightMutexDirect::
00133 has_name() const {
00134   return false;
00135 }
00136 
00137 ////////////////////////////////////////////////////////////////////
00138 //     Function: LightMutexDirect::get_name
00139 //       Access: Public
00140 //  Description: The lightMutex name is only defined when compiling in
00141 //               DEBUG_THREADS mode.
00142 ////////////////////////////////////////////////////////////////////
00143 INLINE string LightMutexDirect::
00144 get_name() const {
00145   return string();
00146 }
 All Classes Functions Variables Enumerations