From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/condition.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/stable/condition.cpp') diff --git a/src/stable/condition.cpp b/src/stable/condition.cpp index 79af262..f02eca7 100644 --- a/src/stable/condition.cpp +++ b/src/stable/condition.cpp @@ -11,39 +11,39 @@ Bu::Condition::Condition() { - pthread_cond_init( &cond, NULL ); + pthread_cond_init( &cond, NULL ); } Bu::Condition::~Condition() { - pthread_cond_destroy( &cond ); + pthread_cond_destroy( &cond ); } int Bu::Condition::wait() { - return pthread_cond_wait( &cond, &mutex ); + return pthread_cond_wait( &cond, &mutex ); } int Bu::Condition::wait( int nSec, int nUSec ) { - struct timeval now; - struct timespec timeout; - struct timezone tz; - - gettimeofday( &now, &tz ); - timeout.tv_sec = now.tv_sec + nSec + ((now.tv_usec + nUSec)/1000000); - timeout.tv_nsec = ((now.tv_usec + nUSec)%1000000)*1000; - - return pthread_cond_timedwait( &cond, &mutex, &timeout ); + struct timeval now; + struct timespec timeout; + struct timezone tz; + + gettimeofday( &now, &tz ); + timeout.tv_sec = now.tv_sec + nSec + ((now.tv_usec + nUSec)/1000000); + timeout.tv_nsec = ((now.tv_usec + nUSec)%1000000)*1000; + + return pthread_cond_timedwait( &cond, &mutex, &timeout ); } int Bu::Condition::signal() { - return pthread_cond_signal( &cond ); + return pthread_cond_signal( &cond ); } int Bu::Condition::broadcast() { - return pthread_cond_broadcast( &cond ); + return pthread_cond_broadcast( &cond ); } -- cgit v1.2.3