summaryrefslogtreecommitdiff
path: root/node/Thread.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-03 10:29:56 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-03 10:29:56 -0400
commit63fa4a684d15409e185422e7641e7c4680d19ec3 (patch)
treef24b0535aed69c5eccd415c344675836d6349772 /node/Thread.cpp
parent3635a940f921a10f229d67a30fde1be650d3a28e (diff)
parent80d8b7d0ae56f1dce8b5b25ab7930df436755daf (diff)
downloadinfinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.tar.gz
infinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.zip
Merge my adamierymenko-dev into the new master that incorporates Raspberry Pi build changes in order to keep everything in sync.
Diffstat (limited to 'node/Thread.cpp')
-rw-r--r--node/Thread.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/node/Thread.cpp b/node/Thread.cpp
index 37a1a5a5..f650f6fc 100644
--- a/node/Thread.cpp
+++ b/node/Thread.cpp
@@ -47,7 +47,6 @@ static void *__m_thread_main(void *ptr)
namespace ZeroTier {
Thread::Thread() :
- suicidalThread(false),
_impl(malloc(sizeof(pthread_t))),
_running()
{
@@ -76,7 +75,7 @@ void Thread::join()
void Thread::sleep(unsigned long ms)
{
- usleep(ms);
+ usleep(ms * 1000);
}
void Thread::__intl_run()
@@ -84,10 +83,6 @@ void Thread::__intl_run()
for(;;) {
_notInit = false;
this->main();
- if (suicidalThread) {
- delete this;
- return;
- }
if (_notInit) // UGLY ASS HACK: see main()
usleep(50);
else break;
@@ -127,7 +122,6 @@ struct __m_thread_info
namespace ZeroTier {
Thread::Thread() :
- suicidalThread(false),
_impl(malloc(sizeof(__m_thread_info))),
_running()
{
@@ -162,10 +156,6 @@ void Thread::__intl_run()
for(;;) {
_notInit = false;
this->main();
- if (suicidalThread) {
- delete this;
- return;
- }
if (_notInit)
Thread::sleep(50);
else break;