[complement-svn] SF.net SVN: complement: [1832] trunk/complement/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2008-03-06 19:53:47
|
Revision: 1832 http://complement.svn.sourceforge.net/complement/?rev=1832&view=rev Author: complement Date: 2008-03-06 11:53:42 -0800 (Thu, 06 Mar 2008) Log Message: ----------- merge -r1828:HEAD branches/complement-sockios/explore Modified Paths: -------------- trunk/complement/explore/include/mt/condition_variable trunk/complement/explore/lib/mt/ChangeLog Modified: trunk/complement/explore/include/mt/condition_variable =================================================================== --- trunk/complement/explore/include/mt/condition_variable 2008-03-06 19:45:40 UTC (rev 1831) +++ trunk/complement/explore/include/mt/condition_variable 2008-03-06 19:53:42 UTC (rev 1832) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <08/03/02 14:44:37 ptr> +// -*- C++ -*- Time-stamp: <08/03/06 13:23:11 ptr> /* * Copyright (c) 1997-1999, 2002-2008 @@ -24,7 +24,11 @@ #include <mt/date_time> #include <mt/mutex> +#ifdef __FIT_PTHREADS +# include <semaphore.h> +#endif + namespace std { namespace tr2 { @@ -97,7 +101,7 @@ lock.lock(); #endif #ifdef __FIT_PTHREADS - int ret = pthread_cond_wait( &_cond, &lock.m->_M_lock ); + int ret = pthread_cond_wait( &_cond, const_cast<pthread_mutex_t *>(&lock.m->_M_lock) ); if ( ret ) { lock.lock(); // throw system_error @@ -119,7 +123,7 @@ ::timespec t; t.tv_sec = abs_time.seconds_since_epoch(); t.tv_nsec = static_cast<long>( abs_time.nanoseconds_since_epoch().count() % nanoseconds::ticks_per_second ); - int ret = pthread_cond_timedwait( &_cond, &lock.m->_M_lock, &t ); + int ret = pthread_cond_timedwait( &_cond, const_cast<pthread_mutex_t *>(&lock.m->_M_lock), &t ); if ( ret != 0 ) { if ( ret == ETIMEDOUT ) { return false; Modified: trunk/complement/explore/lib/mt/ChangeLog =================================================================== --- trunk/complement/explore/lib/mt/ChangeLog 2008-03-06 19:45:40 UTC (rev 1831) +++ trunk/complement/explore/lib/mt/ChangeLog 2008-03-06 19:53:42 UTC (rev 1832) @@ -1,3 +1,8 @@ +2008-03-06 Petr Ovtchenkov <pt...@is...> + + * condition_variable: const casts for pthread_cond_* calls; + add semaphore.h. + 2008-02-26 Petr Ovtchenkov <pt...@is...> * thread, mutex, condition_variable, date_time: implementation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |