diff options
author | tron <tron@openttd.org> | 2005-08-05 09:15:41 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-08-05 09:15:41 +0000 |
commit | 4696ef802a1c3b037a07a841945d73b52720a163 (patch) | |
tree | 4db884818a15ec2dc30fe1f1e660bded27872dae /unix.c | |
parent | 4f9b0d5f294a86cc3f041b3acaf1b1623afb277e (diff) | |
download | openttd-4696ef802a1c3b037a07a841945d73b52720a163.tar.xz |
(svn r2809) Implement more generic threading functions, which allow more than one thread
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -14,9 +14,6 @@ #include <sys/stat.h> #include <time.h> #include <signal.h> -#if !defined(__MORPHOS__) && !defined(__AMIGA__) - #include <pthread.h> -#endif #if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) || defined(__GLIBC__) #define HAS_STATVFS @@ -515,29 +512,6 @@ bool InsertTextBufferClipboard(Textbuf *tb) return false; } -/** Dummy stubs as MorphOS/ AmigaOS does not really - * know about a thread concept nor has a working libpthread */ -#if defined(__MORPHOS__) || defined(__AMIGA__) - typedef int pthread_t; - #define pthread_create(thread, attr, function, arg) (true) - #define pthread_join(thread, retval) -#endif - -static pthread_t thread1 = 0; - -bool CreateOTTDThread(void *func, void *param) -{ - return pthread_create(&thread1, NULL, func, param) == 0; -} - -void JoinOTTDThread(void) -{ - if (thread1 == 0) return; - - pthread_join(thread1, NULL); -} - - #ifdef ENABLE_NETWORK |