Added a name to the RsMutex class.

You can enable the debugging of the waiting time for a lock of RsMutex in rsthreads.h with
#define RSMUTEX_DEBUG 300
That means all locks waiting longer than 300ms are logged into the stderr.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4392 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-07-04 22:59:39 +00:00
parent a94568ac33
commit de87a89437
42 changed files with 103 additions and 64 deletions

View file

@ -71,7 +71,7 @@ const uint32_t FT_TM_CRC_MAP_STATE_HAVE = 2 ;
#define FT_TM_FLAG_CHUNK_CRC 4
ftTransferModule::ftTransferModule(ftFileCreator *fc, ftDataMultiplex *dm, ftController *c)
:mFileCreator(fc), mMultiplexor(dm), mFtController(c), mFlag(FT_TM_FLAG_DOWNLOADING)
:mFileCreator(fc), mMultiplexor(dm), mFtController(c), tfMtx("ftTransferModule"), mFlag(FT_TM_FLAG_DOWNLOADING)
{
RsStackMutex stack(tfMtx); /******* STACK LOCKED ******/
@ -518,7 +518,7 @@ class HashThread: public RsThread
{
public:
HashThread(ftFileCreator *m)
: _m(m),_finished(false),_hash("") {}
: _hashThreadMtx("HashThread"), _m(m),_finished(false),_hash("") {}
virtual void run()
{