diff options
Diffstat (limited to 'platform/android/thread_jandroid.cpp')
-rw-r--r-- | platform/android/thread_jandroid.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/thread_jandroid.cpp b/platform/android/thread_jandroid.cpp index 1425e23c73..73818b282f 100644 --- a/platform/android/thread_jandroid.cpp +++ b/platform/android/thread_jandroid.cpp @@ -29,6 +29,7 @@ #include "thread_jandroid.h" #include "os/memory.h" +#include "script_language.h" Thread::ID ThreadAndroid::get_ID() const { @@ -44,8 +45,10 @@ void *ThreadAndroid::thread_callback(void *userdata) { ThreadAndroid *t=reinterpret_cast<ThreadAndroid*>(userdata); setup_thread(); + ScriptServer::thread_enter(); //scripts may need to attach a stack t->id=(ID)pthread_self(); t->callback(t->user); + ScriptServer::thread_exit(); return NULL; } @@ -61,10 +64,12 @@ Thread* ThreadAndroid::create_func_jandroid(ThreadCreateCallback p_callback,void return tr; } + Thread::ID ThreadAndroid::get_thread_ID_func_jandroid() { return (ID)pthread_self(); } + void ThreadAndroid::wait_to_finish_func_jandroid(Thread* p_thread) { ThreadAndroid *tp=static_cast<ThreadAndroid*>(p_thread); |