[complement-svn] SF.net SVN: complement: [1589] branches/complement-xmt/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-06-29 11:25:34
|
Revision: 1589 http://svn.sourceforge.net/complement/?rev=1589&view=rev Author: complement Date: 2007-06-29 04:25:32 -0700 (Fri, 29 Jun 2007) Log Message: ----------- mutexRS renamed to recursive_mutex; LockerRS renamed to recursive_scoped_lock; LockerSDS to recursive_scoped_lock Modified Paths: -------------- branches/complement-xmt/explore/include/mt/xmt.h branches/complement-xmt/explore/include/stem/EventHandler.h branches/complement-xmt/explore/lib/mt/ChangeLog branches/complement-xmt/explore/lib/stem/ChangeLog branches/complement-xmt/explore/lib/stem/_EventHandler.cc Modified: branches/complement-xmt/explore/include/mt/xmt.h =================================================================== --- branches/complement-xmt/explore/include/mt/xmt.h 2007-06-29 10:44:29 UTC (rev 1588) +++ branches/complement-xmt/explore/include/mt/xmt.h 2007-06-29 11:25:32 UTC (rev 1589) @@ -58,7 +58,6 @@ # define MT_REENTRANT(point,nm) xmt::scoped_lock nm(point) # define MT_REENTRANT_RS(point,nm) xmt::LockerRS nm(point) -# define MT_REENTRANT_SDS(point,nm) xmt::LockerSDS nm(point) // obsolete, use MT_REENTRANT_RS # define MT_LOCK(point) point.lock() # define MT_UNLOCK(point) point.unlock() # ifdef __FIT_RWLOCK @@ -77,7 +76,6 @@ # define MT_REENTRANT(point,nm) ((void)0) # define MT_REENTRANT_RS(point,nm) ((void)0) -# define MT_REENTRANT_SDS(point,nm) ((void)0) // obsolete, use MT_REENTRANT_RS # define MT_LOCK(point) ((void)0) # define MT_UNLOCK(point) ((void)0) # define MT_REENTRANT_RD(point,nm) ((void)0) @@ -903,8 +901,7 @@ #endif // __FIT_RWLOCK typedef __mutex<false,false> mutex; -typedef __mutex<true,false> mutexRS; -typedef __mutex<true,false> mutexSDS; // obsolete, use instead mutexRS +typedef __mutex<true,false> recursive_mutex; #ifdef __FIT_RWLOCK typedef __mutexRW<false> mutexRW; #endif // __FIT_RWLOCK @@ -913,9 +910,8 @@ typedef __Spinlock<true,false> SpinlockRS; #endif // __FIT_RWLOCK -typedef basic_lock<mutex> scoped_lock; -typedef basic_lock<mutexRS> LockerRS; -typedef basic_lock<mutexRS> LockerSDS; // obsolete, use instead LockerRS +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; Modified: branches/complement-xmt/explore/include/stem/EventHandler.h =================================================================== --- branches/complement-xmt/explore/include/stem/EventHandler.h 2007-06-29 10:44:29 UTC (rev 1588) +++ branches/complement-xmt/explore/include/stem/EventHandler.h 2007-06-29 11:25:32 UTC (rev 1589) @@ -542,7 +542,7 @@ // See comment near EventHandler::EventHandler() implementation // HistoryContainer& theHistory; HistoryContainer theHistory; - xmt::mutexRS _theHistory_lock; + xmt::recursive_mutex _theHistory_lock; public: @@ -705,7 +705,7 @@ { theEventsTable.Out( out ); } \ virtual bool DispatchTrace( const stem::Event& __e, std::ostream& __s )\ { \ - MT_REENTRANT_SDS( this->_theHistory_lock, _x1 ); \ + xmt::recursive_scoped_lock lk( this->_theHistory_lock ); \ return theEventsTable.DispatchTrace( theHistory.begin(), \ theHistory.end(), __e, __s ); } \ virtual const std::type_info& classtype() const \ @@ -718,12 +718,12 @@ protected: \ virtual bool Dispatch( const stem::Event& __e ) \ { \ - MT_REENTRANT_SDS( this->_theHistory_lock, _x1 ); \ + xmt::recursive_scoped_lock lk( this->_theHistory_lock ); \ return theEventsTable.Dispatch( this, theHistory.begin(), \ theHistory.end(), __e ); } \ virtual bool DispatchStub( const stem::Event& __e ) \ { \ - MT_REENTRANT_SDS( this->_theHistory_lock, _x1 ); \ + xmt::recursive_scoped_lock lk( this->_theHistory_lock ); \ return theEventsTable.DispatchStub( this, theHistory.begin(), \ theHistory.end(), __e ); } \ static __FIT_DECLSPEC evtable_type theEventsTable; \ Modified: branches/complement-xmt/explore/lib/mt/ChangeLog =================================================================== --- branches/complement-xmt/explore/lib/mt/ChangeLog 2007-06-29 10:44:29 UTC (rev 1588) +++ branches/complement-xmt/explore/lib/mt/ChangeLog 2007-06-29 11:25:32 UTC (rev 1589) @@ -2,8 +2,11 @@ * xmt.h, xmt.cc, uid.cc, thr_mgr.cc: replace Locker by scoped_lock. - * shm.h, xmt.h, xmt.cc, thr_mgr.h, uid.cc, time.cc: all Mutex replaced by mutex + * shm.h, xmt.h, xmt.cc, thr_mgr.h, uid.cc, time.cc: all Mutex replaced by mutex; + * xmt.h: mutexRS renamed to recursive_mutex; LockerRS renamed to + recursive_scoped_lock; obsolete LockerSDS removed; + 2007-06-14 Petr Ovtchenkov <pt...@is...> * xmt.h, xmt.cc, shm.h: step to interface like boost or Modified: branches/complement-xmt/explore/lib/stem/ChangeLog =================================================================== --- branches/complement-xmt/explore/lib/stem/ChangeLog 2007-06-29 10:44:29 UTC (rev 1588) +++ branches/complement-xmt/explore/lib/stem/ChangeLog 2007-06-29 11:25:32 UTC (rev 1589) @@ -5,6 +5,10 @@ * EvManager.cc, _EventHandler.cc, EventHandler.h, EvManager.h, Cron.h: all Mutex replaced by mutex + * EventHandler.h, _EventHandler.cc: mutexRS renamed to recursive_mutex; + LockerRS renamed to recursive_scoped_lock; obsolete LockerSDS + replaced by recursive_scoped_lock; + 2007-03-12 Petr Ovtchenkov <pt...@is...> * EvManager.h, EvManager.cc: trace-related locks, flags and Modified: branches/complement-xmt/explore/lib/stem/_EventHandler.cc =================================================================== --- branches/complement-xmt/explore/lib/stem/_EventHandler.cc 2007-06-29 10:44:29 UTC (rev 1588) +++ branches/complement-xmt/explore/lib/stem/_EventHandler.cc 2007-06-29 11:25:32 UTC (rev 1589) @@ -50,7 +50,7 @@ void EventHandler::Init::_guard( int direction ) { - static xmt::mutexRS _init_lock; + static xmt::recursive_mutex _init_lock; static int _count = 0; if ( direction ) { @@ -122,21 +122,21 @@ void EventHandler::PushState( state_type state ) { RemoveState( state ); - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); theHistory.push_front( state ); } __FIT_DECLSPEC state_type EventHandler::State() const { - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); return theHistory.front(); } __FIT_DECLSPEC void EventHandler::PushTState( state_type state ) { - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); theHistory.push_front( ST_TERMINAL ); theHistory.push_front( state ); } @@ -144,7 +144,7 @@ __FIT_DECLSPEC void EventHandler::PopState() { - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); theHistory.pop_front(); while ( theHistory.front() == ST_TERMINAL ) { theHistory.pop_front(); @@ -154,7 +154,7 @@ __FIT_DECLSPEC void EventHandler::PopState( state_type state ) { - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); h_iterator hst_i = __find( state ); if ( hst_i != theHistory.end() && *hst_i != ST_TERMINAL ) { theHistory.erase( theHistory.begin(), ++hst_i ); @@ -164,7 +164,7 @@ __FIT_DECLSPEC void EventHandler::RemoveState( state_type state ) { - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); h_iterator hst_i = __find( state ); if ( hst_i != theHistory.end() && *hst_i != ST_TERMINAL ) { theHistory.erase( hst_i ); @@ -174,7 +174,7 @@ __FIT_DECLSPEC bool EventHandler::isState( state_type state ) const { - MT_REENTRANT_SDS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); const HistoryContainer& hst = theHistory; const_h_iterator hst_i = __find( state ); if ( hst_i != hst.end() && *hst_i != ST_TERMINAL ) { @@ -249,7 +249,7 @@ __FIT_DECLSPEC void EventHandler::TraceStack( ostream& out ) const { - MT_REENTRANT_RS( _theHistory_lock, _x1 ); + xmt::recursive_scoped_lock lk( _theHistory_lock ); const HistoryContainer& hst = theHistory; HistoryContainer::const_iterator hst_i = hst.begin(); while ( hst_i != hst.end() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |