[complement-svn] SF.net SVN: complement: [1590] branches/complement-xmt/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-06-29 12:03:14
|
Revision: 1590 http://svn.sourceforge.net/complement/?rev=1590&view=rev Author: complement Date: 2007-06-29 05:03:13 -0700 (Fri, 29 Jun 2007) Log Message: ----------- LockerRd renamed to rd_scoped_lock, LockerWr to wr_scoped_lock, __mutex_rw_base to __rw_mutex_base, mutexRW to rw_mutex. Modified Paths: -------------- branches/complement-xmt/explore/include/mt/xmt.h branches/complement-xmt/explore/lib/mt/ChangeLog Modified: branches/complement-xmt/explore/include/mt/xmt.h =================================================================== --- branches/complement-xmt/explore/include/mt/xmt.h 2007-06-29 11:25:32 UTC (rev 1589) +++ branches/complement-xmt/explore/include/mt/xmt.h 2007-06-29 12:03:13 UTC (rev 1590) @@ -57,20 +57,8 @@ #ifdef _REENTRANT # define MT_REENTRANT(point,nm) xmt::scoped_lock nm(point) -# define MT_REENTRANT_RS(point,nm) xmt::LockerRS nm(point) # define MT_LOCK(point) point.lock() # define MT_UNLOCK(point) point.unlock() -# ifdef __FIT_RWLOCK -# define MT_REENTRANT_RD(point,nm) xmt::LockerRd nm(point) -# define MT_REENTRANT_WR(point,nm) xmt::LockerWr nm(point) -# define MT_LOCK_RD(point) point.rdlock() -# define MT_LOCK_WR(point) point.wrlock() -# else // !__FIT_RWLOCK -# define MT_REENTRANT_RD(point,nm) ((void)0) -# define MT_REENTRANT_WR(point,nm) ((void)0) -# define MT_LOCK_RD(point) ((void)0) -# define MT_LOCK_WR(point) ((void)0) -# endif // __FIT_RWLOCK #else // !_REENTRANT @@ -78,10 +66,6 @@ # define MT_REENTRANT_RS(point,nm) ((void)0) # define MT_LOCK(point) ((void)0) # define MT_UNLOCK(point) ((void)0) -# define MT_REENTRANT_RD(point,nm) ((void)0) -# define MT_REENTRANT_WR(point,nm) ((void)0) -# define MT_LOCK_RD(point) ((void)0) -# define MT_LOCK_WR(point) ((void)0) #endif // _REENTRANT @@ -647,10 +631,10 @@ // Read-write mutex: IEEE Std 1003.1, 2001, 2004 Editions template <bool SCOPE> -class __mutex_rw_base +class __rw_mutex_base { public: - __mutex_rw_base() + __rw_mutex_base() { #ifdef _PTHREADS if ( SCOPE ) { @@ -683,7 +667,7 @@ #endif } - ~__mutex_rw_base() + ~__rw_mutex_base() { #ifdef _PTHREADS pthread_rwlock_destroy( &_M_lock ); @@ -699,7 +683,7 @@ } private: - __mutex_rw_base( const __mutex_rw_base& ) + __rw_mutex_base( const __rw_mutex_base& ) { } protected: @@ -717,14 +701,14 @@ }; template <bool SCOPE> -class __mutexRW : - public __mutex_rw_base<SCOPE> +class __rw_mutex : + public __rw_mutex_base<SCOPE> { public: - __mutexRW() + __rw_mutex() { } - ~__mutexRW() + ~__rw_mutex() { } void rdlock() @@ -814,7 +798,7 @@ } private: - __mutexRW( const __mutexRW& ) + __rw_mutex( const __rw_mutex& ) { } }; @@ -903,7 +887,7 @@ typedef __mutex<false,false> mutex; typedef __mutex<true,false> recursive_mutex; #ifdef __FIT_RWLOCK -typedef __mutexRW<false> mutexRW; +typedef __rw_mutex<false> rw_mutex; #endif // __FIT_RWLOCK #ifdef __FIT_PTHREAD_SPINLOCK typedef __Spinlock<false,false> Spinlock; @@ -913,8 +897,8 @@ typedef basic_lock<mutex> scoped_lock; typedef basic_lock<recursive_mutex> recursive_scoped_lock; #ifdef __FIT_RWLOCK -typedef basic_read_lock<__mutexRW<false> > LockerRd; -typedef basic_lock<__mutexRW<false> > LockerWr; +typedef basic_read_lock<__rw_mutex<false> > rd_scoped_lock; +typedef basic_lock<__rw_mutex<false> > wr_scoped_lock; #endif // __FIT_RWLOCK #ifdef __FIT_PTHREAD_SPINLOCK typedef basic_lock<Spinlock> LockerSpin; Modified: branches/complement-xmt/explore/lib/mt/ChangeLog =================================================================== --- branches/complement-xmt/explore/lib/mt/ChangeLog 2007-06-29 11:25:32 UTC (rev 1589) +++ branches/complement-xmt/explore/lib/mt/ChangeLog 2007-06-29 12:03:13 UTC (rev 1590) @@ -7,6 +7,9 @@ * xmt.h: mutexRS renamed to recursive_mutex; LockerRS renamed to recursive_scoped_lock; obsolete LockerSDS removed; + * xmt.h: LockerRd renamed to rd_scoped_lock, LockerWr to wr_scoped_lock, + __mutex_rw_base to __rw_mutex_base, mutexRW to rw_mutex. + 2007-06-14 Petr Ovtchenkov <pt...@is...> * xmt.h, xmt.cc, shm.h: step to interface like boost or This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |