summaryrefslogtreecommitdiff
path: root/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/unix.c b/unix.c
index b4c353878..0f98008bb 100644
--- a/unix.c
+++ b/unix.c
@@ -11,6 +11,7 @@
#include <time.h>
#include <pwd.h>
#include <signal.h>
+#include <pthread.h>
#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) || defined(__GLIBC__)
#define HAS_STATVFS
@@ -554,3 +555,18 @@ bool InsertTextBufferClipboard(Textbuf *tb)
{
return false;
}
+
+static pthread_t thread1 = 0;
+bool CreateOTTDThread(void *func, void *param)
+{
+ return (pthread_create(&thread1, NULL, func, param) == 0) ? true : false;
+}
+
+void CloseOTTDThread(void) {return;}
+
+void JoinOTTDThread(void)
+{
+ if (thread1 == 0) return;
+
+ pthread_join(thread1, NULL);
+}