summaryrefslogtreecommitdiff
path: root/core/os/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/thread.cpp')
-rw-r--r--core/os/thread.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/core/os/thread.cpp b/core/os/thread.cpp
index 689fed7537..1c6ccaa504 100644
--- a/core/os/thread.cpp
+++ b/core/os/thread.cpp
@@ -28,13 +28,12 @@
/*************************************************************************/
#include "thread.h"
+Thread *(*Thread::create_func)(ThreadCreateCallback, void *, const Settings &) = NULL;
+Thread::ID (*Thread::get_thread_ID_func)() = NULL;
+void (*Thread::wait_to_finish_func)(Thread *) = NULL;
+Error (*Thread::set_name_func)(const String &) = NULL;
-Thread* (*Thread::create_func)(ThreadCreateCallback,void *,const Settings&)=NULL;
-Thread::ID (*Thread::get_thread_ID_func)()=NULL;
-void (*Thread::wait_to_finish_func)(Thread*)=NULL;
-Error (*Thread::set_name_func)(const String&)=NULL;
-
-Thread::ID Thread::_main_thread_id=0;
+Thread::ID Thread::_main_thread_id = 0;
Thread::ID Thread::get_caller_ID() {
@@ -43,11 +42,11 @@ Thread::ID Thread::get_caller_ID() {
return 0;
}
-Thread* Thread::create(ThreadCreateCallback p_callback,void * p_user,const Settings& p_settings) {
+Thread *Thread::create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings) {
if (create_func) {
- return create_func(p_callback,p_user,p_settings);
+ return create_func(p_callback, p_user, p_settings);
}
return NULL;
}
@@ -56,7 +55,6 @@ void Thread::wait_to_finish(Thread *p_thread) {
if (wait_to_finish_func)
wait_to_finish_func(p_thread);
-
}
Error Thread::set_name(const String &p_name) {
@@ -67,13 +65,8 @@ Error Thread::set_name(const String &p_name) {
return ERR_UNAVAILABLE;
};
-Thread::Thread()
-{
+Thread::Thread() {
}
-
-Thread::~Thread()
-{
+Thread::~Thread() {
}
-
-