summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Thread.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Thread.cpp b/src/Thread.cpp
index 8e37dfe..00bc616 100644
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -70,6 +70,18 @@ Thread::get()
return *this_thread;
}
+
+void*
+Thread::_static_run(void* thread)
+{
+ Thread* me = (Thread*)thread;
+ pthread_setspecific(me->_thread_key, thread);
+ me->_run();
+ me->_pthread_exists = false;
+ return NULL;
+}
+
+
/** Launch and start the thread. */
void
Thread::start()