[complement-svn] SF.net SVN: complement: [1829] branches/complement-sockios/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2008-03-06 19:50:08
|
Revision: 1829 http://complement.svn.sourceforge.net/complement/?rev=1829&view=rev Author: complement Date: 2008-03-06 11:42:31 -0800 (Thu, 06 Mar 2008) Log Message: ----------- const casts for pthread_cond_* calls; add semaphore.h Modified Paths: -------------- branches/complement-sockios/explore/include/mt/condition_variable branches/complement-sockios/explore/lib/mt/ChangeLog Modified: branches/complement-sockios/explore/include/mt/condition_variable =================================================================== --- branches/complement-sockios/explore/include/mt/condition_variable 2008-02-28 18:15:40 UTC (rev 1828) +++ branches/complement-sockios/explore/include/mt/condition_variable 2008-03-06 19:42:31 UTC (rev 1829) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <08/02/25 13:09:15 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: branches/complement-sockios/explore/lib/mt/ChangeLog =================================================================== --- branches/complement-sockios/explore/lib/mt/ChangeLog 2008-02-28 18:15:40 UTC (rev 1828) +++ branches/complement-sockios/explore/lib/mt/ChangeLog 2008-03-06 19:42:31 UTC (rev 1829) @@ -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. |