mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
revert my last changes, because _thread_id is useful for debugging
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3130 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
876e33dc0a
commit
c5eade329b
@ -46,9 +46,7 @@ class RsMutex
|
|||||||
{
|
{
|
||||||
pthread_mutex_init(&realMutex, NULL);
|
pthread_mutex_init(&realMutex, NULL);
|
||||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||||
//_thread_id = {NULL, 0} ; // need c++
|
_thread_id = 0 ;
|
||||||
_thread_id.p = NULL;
|
|
||||||
_thread_id.x = 0;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~RsMutex()
|
~RsMutex()
|
||||||
@ -64,8 +62,8 @@ class RsMutex
|
|||||||
#endif
|
#endif
|
||||||
pthread_mutex_lock(&realMutex);
|
pthread_mutex_lock(&realMutex);
|
||||||
|
|
||||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
|
||||||
_thread_id = pthread_self() ;
|
_thread_id = pthread_self() ;
|
||||||
|
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||||
++_cnt ;
|
++_cnt ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -74,9 +72,9 @@ class RsMutex
|
|||||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||||
if(--_cnt == 0)
|
if(--_cnt == 0)
|
||||||
{
|
{
|
||||||
//_thread_id = {NULL, 0} ; // need c++
|
#endif
|
||||||
_thread_id.p = NULL;
|
#ifndef WIN32
|
||||||
_thread_id.x = 0;
|
_thread_id = 0 ;
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock(&realMutex);
|
pthread_mutex_unlock(&realMutex);
|
||||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||||
@ -87,8 +85,8 @@ class RsMutex
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
pthread_mutex_t realMutex;
|
pthread_mutex_t realMutex;
|
||||||
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
|
||||||
pthread_t _thread_id ;
|
pthread_t _thread_id ;
|
||||||
|
#ifdef RSTHREAD_SELF_LOCKING_GUARD
|
||||||
uint32_t _cnt ;
|
uint32_t _cnt ;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user