mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added a member in RsThread that indicates the id of the thread currently owning the lock, for debugging purposes
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2132 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
656aa9db5d
commit
0266420798
@ -58,8 +58,8 @@ class RsMutex
|
||||
#endif
|
||||
pthread_mutex_lock(&realMutex);
|
||||
|
||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||
_thread_id = pthread_self() ;
|
||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||
++_cnt ;
|
||||
#endif
|
||||
}
|
||||
@ -69,9 +69,9 @@ class RsMutex
|
||||
if(--_cnt == 0)
|
||||
{
|
||||
#endif
|
||||
_thread_id = 0 ;
|
||||
pthread_mutex_unlock(&realMutex);
|
||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||
_thread_id = 0 ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -79,8 +79,8 @@ class RsMutex
|
||||
|
||||
private:
|
||||
pthread_mutex_t realMutex;
|
||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||
pthread_t _thread_id ;
|
||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||
uint32_t _cnt ;
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user