diff options
Diffstat (limited to 'src/Thread.cpp')
-rw-r--r-- | src/Thread.cpp | 12 |
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() |