00001 // Filename: conditionVarSimpleImpl.I 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 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: ConditionVarSimpleImpl::Constructor 00018 // Access: Public 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE ConditionVarSimpleImpl:: 00022 ConditionVarSimpleImpl(MutexTrueImpl &mutex) : _mutex(mutex) { 00023 } 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Function: ConditionVarSimpleImpl::Destructor 00027 // Access: Public 00028 // Description: 00029 //////////////////////////////////////////////////////////////////// 00030 INLINE ConditionVarSimpleImpl:: 00031 ~ConditionVarSimpleImpl() { 00032 } 00033 00034 //////////////////////////////////////////////////////////////////// 00035 // Function: ConditionVarSimpleImpl::notify 00036 // Access: Public 00037 // Description: 00038 //////////////////////////////////////////////////////////////////// 00039 INLINE void ConditionVarSimpleImpl:: 00040 notify() { 00041 if (_flags & F_has_waiters) { 00042 do_notify(); 00043 } 00044 } 00045 00046 //////////////////////////////////////////////////////////////////// 00047 // Function: ConditionVarSimpleImpl::notify_all 00048 // Access: Public 00049 // Description: 00050 //////////////////////////////////////////////////////////////////// 00051 INLINE void ConditionVarSimpleImpl:: 00052 notify_all() { 00053 if (_flags & F_has_waiters) { 00054 do_notify_all(); 00055 } 00056 }