summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index e9d5d0ff1..a2475408b 100644
--- a/thread.c
+++ b/thread.c
@@ -7,7 +7,7 @@
#if defined(__AMIGA__) || defined(__MORPHOS__)
OTTDThread* OTTDCreateThread(OTTDThreadFunc function, void* arg) { return NULL; }
void* OTTDJoinThread(OTTDThread* t) { return NULL; }
-
+void OTTDExitThread() { NOT_REACHED(); };
#elif defined(__OS2__)
@@ -57,6 +57,10 @@ void* OTTDJoinThread(OTTDThread* t)
return ret;
}
+void OTTDExitThread(void)
+{
+ _endthread();
+}
#elif defined(UNIX)
@@ -91,6 +95,10 @@ void* OTTDJoinThread(OTTDThread* t)
return ret;
}
+void OTTDExitThread(void)
+{
+ pthread_exit(NULL);
+}
#elif defined(WIN32)
@@ -141,4 +149,9 @@ void* OTTDJoinThread(OTTDThread* t)
free(t);
return ret;
}
+
+void OTTDExitThread(void)
+{
+ ExitThread(0);
+}
#endif