about summary refs log tree commit diff
path: root/src/base/system.c
diff options
context:
space:
mode:
authorheinrich5991 <heinrich5991@gmail.com>2011-05-01 15:48:09 +0200
committerheinrich5991 <heinrich5991@gmail.com>2011-05-01 15:48:09 +0200
commit0ea5641df42858833cb9c865e3dce21e8faa461d (patch)
treeeb8e7755ff2b0cc3602731ca8d924818434aef6e /src/base/system.c
parentb60dc13fbb9c40f8baaa29d6a057a0ab1decbbcc (diff)
downloadzcatch-0ea5641df42858833cb9c865e3dce21e8faa461d.tar.gz
zcatch-0ea5641df42858833cb9c865e3dce21e8faa461d.zip
adding thread_detach to system.h and system.c
Diffstat (limited to 'src/base/system.c')
-rw-r--r--src/base/system.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/base/system.c b/src/base/system.c
index 9cc7f690..2f4c5c7b 100644
--- a/src/base/system.c
+++ b/src/base/system.c
@@ -408,6 +408,17 @@ void thread_sleep(int milliseconds)
 #endif
 }
 
+void thread_detach(void *thread)
+{
+#if defined(CONF_FAMILY_UNIX)
+	pthread_detach((pthread_t)(thread));
+#elif defined(CONF_FAMILY_WINDOWS)
+	CloseHandle(thread);
+#else
+	#error not implemented
+#endif
+}
+