From 878f31bbd0d5529f730268e9809d2ee9e77cab3c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 7 Jan 2010 16:15:39 +0000 Subject: Hide _static_run implementation. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2364 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Thread.hpp | 9 +-------- 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() -- cgit v1.2.1