summaryrefslogtreecommitdiff
path: root/src/threading.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threading.h')
-rw-r--r--src/threading.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/threading.h b/src/threading.h
index 1f3969b6..afe5b235 100644
--- a/src/threading.h
+++ b/src/threading.h
@@ -91,6 +91,17 @@ of_thread_join(of_thread_t thread)
#endif
}
+static OF_INLINE BOOL
+of_thread_detach(of_thread_t thread)
+{
+#if defined(OF_HAVE_PTHREADS)
+ return !pthread_detach(thread);
+#elif defined(_WIN32)
+ /* FIXME */
+ return YES;
+#endif
+}
+
static OF_INLINE void
of_thread_exit()
{