mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-30 11:24:24 -04:00
Moved constructor of class bdThread from bdThreads.h to bdThreads.cc.
Initialized member mTid of class RsThread too. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3338 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e71b1c249f
commit
a595ba4fc7
3 changed files with 16 additions and 8 deletions
|
@ -64,6 +64,15 @@ pthread_t createThread(bdThread &thread)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bdThread::bdThread()
|
||||||
|
{
|
||||||
|
#if defined(_WIN32) || defined(__MINGW32__)
|
||||||
|
memset (&mTid, 0, sizeof(mTid));
|
||||||
|
#else
|
||||||
|
mTid = 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void bdThread::join() /* waits for the the mTid thread to stop */
|
void bdThread::join() /* waits for the the mTid thread to stop */
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
|
@ -65,14 +65,7 @@ pthread_t createThread(bdThread &thread);
|
||||||
class bdThread
|
class bdThread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bdThread()
|
bdThread();
|
||||||
{
|
|
||||||
#if defined(_WIN32) || defined(__MINGW32__)
|
|
||||||
memset (&mTid, 0, sizeof(mTid));
|
|
||||||
#else
|
|
||||||
mTid = 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
virtual ~bdThread() { return; }
|
virtual ~bdThread() { return; }
|
||||||
|
|
||||||
virtual void start() { createThread(*this); }
|
virtual void start() { createThread(*this); }
|
||||||
|
|
|
@ -83,6 +83,12 @@ pthread_t createThread(RsThread &thread)
|
||||||
RsThread::RsThread ()
|
RsThread::RsThread ()
|
||||||
{
|
{
|
||||||
m_bRun = true;
|
m_bRun = true;
|
||||||
|
|
||||||
|
#ifdef WINDOWS_SYS
|
||||||
|
memset (&mTid, 0, sizeof(mTid));
|
||||||
|
#else
|
||||||
|
mTid = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsThread::join() /* waits for the the mTid thread to stop */
|
void RsThread::join() /* waits for the the mTid thread to stop */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue