Dropped level of some debug.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2654 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2008-10-09 08:28:02 +00:00
parent fff2e022ff
commit bef8c7bc16
1 changed files with 11 additions and 11 deletions

View File

@ -123,7 +123,7 @@ void Condition::wait()
bool Condition::wait( int secs ) bool Condition::wait( int secs )
{ {
// Locking done outside of this function // Locking done outside of this function
Debug( 3, "Waiting for %d seconds", secs ); Debug( 8, "Waiting for %d seconds", secs );
struct timespec timeout = getTimeout( secs ); struct timespec timeout = getTimeout( secs );
if ( pthread_cond_timedwait( &mCondition, mMutex.getMutex(), &timeout ) < 0 && errno != ETIMEDOUT ) if ( pthread_cond_timedwait( &mCondition, mMutex.getMutex(), &timeout ) < 0 && errno != ETIMEDOUT )
throw ThreadException( stringtf( "Unable to timedwait pthread condition: %s", strerror(errno) ) ); throw ThreadException( stringtf( "Unable to timedwait pthread condition: %s", strerror(errno) ) );
@ -169,7 +169,7 @@ template <class T> T ThreadData<T>::setValue( const T value )
template <class T> const T ThreadData<T>::getUpdatedValue() const template <class T> const T ThreadData<T>::getUpdatedValue() const
{ {
Debug( 3, "Waiting for value update, %p", this ); Debug( 8, "Waiting for value update, %p", this );
mMutex.lock(); mMutex.lock();
mChanged = false; mChanged = false;
//do { //do {
@ -177,13 +177,13 @@ template <class T> const T ThreadData<T>::getUpdatedValue() const
//} while ( !mChanged ); //} while ( !mChanged );
const T valueCopy = mValue; const T valueCopy = mValue;
mMutex.unlock(); mMutex.unlock();
Debug( 4, "Got value update, %p", this ); Debug( 9, "Got value update, %p", this );
return( valueCopy ); return( valueCopy );
} }
template <class T> const T ThreadData<T>::getUpdatedValue( double secs ) const template <class T> const T ThreadData<T>::getUpdatedValue( double secs ) const
{ {
Debug( 3, "Waiting for value update, %.2f secs, %p", secs, this ); Debug( 8, "Waiting for value update, %.2f secs, %p", secs, this );
mMutex.lock(); mMutex.lock();
mChanged = false; mChanged = false;
//do { //do {
@ -191,13 +191,13 @@ template <class T> const T ThreadData<T>::getUpdatedValue( double secs ) const
//} while ( !mChanged ); //} while ( !mChanged );
const T valueCopy = mValue; const T valueCopy = mValue;
mMutex.unlock(); mMutex.unlock();
Debug( 4, "Got value update, %p", this ); Debug( 9, "Got value update, %p", this );
return( valueCopy ); return( valueCopy );
} }
template <class T> const T ThreadData<T>::getUpdatedValue( int secs ) const template <class T> const T ThreadData<T>::getUpdatedValue( int secs ) const
{ {
Debug( 3, "Waiting for value update, %d secs, %p", secs, this ); Debug( 8, "Waiting for value update, %d secs, %p", secs, this );
mMutex.lock(); mMutex.lock();
mChanged = false; mChanged = false;
//do { //do {
@ -205,30 +205,30 @@ template <class T> const T ThreadData<T>::getUpdatedValue( int secs ) const
//} while ( !mChanged ); //} while ( !mChanged );
const T valueCopy = mValue; const T valueCopy = mValue;
mMutex.unlock(); mMutex.unlock();
Debug( 4, "Got value update, %p", this ); Debug( 9, "Got value update, %p", this );
return( valueCopy ); return( valueCopy );
} }
template <class T> void ThreadData<T>::updateValueSignal( const T value ) template <class T> void ThreadData<T>::updateValueSignal( const T value )
{ {
Debug( 3, "Updating value with signal, %p", this ); Debug( 8, "Updating value with signal, %p", this );
mMutex.lock(); mMutex.lock();
mValue = value; mValue = value;
mChanged = true; mChanged = true;
mCondition.signal(); mCondition.signal();
mMutex.unlock(); mMutex.unlock();
Debug( 4, "Updated value, %p", this ); Debug( 9, "Updated value, %p", this );
} }
template <class T> void ThreadData<T>::updateValueBroadcast( const T value ) template <class T> void ThreadData<T>::updateValueBroadcast( const T value )
{ {
Debug( 3, "Updating value with broadcast, %p", this ); Debug( 8, "Updating value with broadcast, %p", this );
mMutex.lock(); mMutex.lock();
mValue = value; mValue = value;
mChanged = true; mChanged = true;
mCondition.broadcast(); mCondition.broadcast();
mMutex.unlock(); mMutex.unlock();
Debug( 4, "Updated value, %p", this ); Debug( 9, "Updated value, %p", this );
} }
Thread::Thread() : Thread::Thread() :