diff options
author | David Robillard <d@drobilla.net> | 2010-01-07 16:15:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-01-07 16:15:39 +0000 |
commit | 878f31bbd0d5529f730268e9809d2ee9e77cab3c (patch) | |
tree | 38cb0793f445bc584e40c68a2f6e9fc183292017 | |
parent | fd945013143466e26f0d481d675401fa745716ba (diff) | |
download | raul-878f31bbd0d5529f730268e9809d2ee9e77cab3c.tar.gz raul-878f31bbd0d5529f730268e9809d2ee9e77cab3c.tar.bz2 raul-878f31bbd0d5529f730268e9809d2ee9e77cab3c.zip |
Hide _static_run implementation.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2364 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | raul/Thread.hpp | 9 | ||||
-rw-r--r-- | src/Thread.cpp | 12 |
2 files changed, 13 insertions, 8 deletions
diff --git a/raul/Thread.hpp b/raul/Thread.hpp index 50d7025..4d5cef3 100644 --- a/raul/Thread.hpp +++ b/raul/Thread.hpp @@ -79,14 +79,7 @@ protected: bool _exit_flag; private: - - inline static void* _static_run(void* me) { - pthread_setspecific(_thread_key, me); - Thread* myself = (Thread*)me; - myself->_run(); - myself->_pthread_exists = false; - return NULL; // and I - } + static void* _static_run(void* me); /** Allocate thread-specific data key */ static void thread_key_alloc() { 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() |