summaryrefslogtreecommitdiff
path: root/lib/windows-thread.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-07-15 02:35:58 +0200
committerBruno Haible <bruno@clisp.org>2019-07-15 02:35:58 +0200
commit6f520fb1dd6fcc2caeb2fc9fed9140f5d96f84a7 (patch)
treeb0a2b4ff3ed1701fe7710c9bdb5841fd1bfd18c9 /lib/windows-thread.h
parentf249808baa3f4f30386185b53bd6ac053a1272e1 (diff)
downloadgnulib-6f520fb1dd6fcc2caeb2fc9fed9140f5d96f84a7.tar.gz
windows-thread: Add support for creating a thread in detached state.
* lib/windows-thread.h (GLWTHREAD_ATTR_DETACHED): New macro. (glwthread_thread_create): Add attr argument. * lib/windows-thread.c (glwthread_thread_create): Likewise. * lib/glthread/thread.h (glthread_create): Update. * lib/thrd.c (thrd_create): Update.
Diffstat (limited to 'lib/windows-thread.h')
-rw-r--r--lib/windows-thread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/windows-thread.h b/lib/windows-thread.h
index 8bf98fbf46..70e5d00419 100644
--- a/lib/windows-thread.h
+++ b/lib/windows-thread.h
@@ -38,7 +38,10 @@ typedef struct glwthread_thread_struct *glwthread_thread_t;
extern "C" {
#endif
+/* attr is a bit mask, consisting of the following bits: */
+#define GLWTHREAD_ATTR_DETACHED 1
extern int glwthread_thread_create (glwthread_thread_t *threadp,
+ unsigned int attr,
void * (*func) (void *), void *arg);
extern int glwthread_thread_join (glwthread_thread_t thread, void **retvalp);
extern int glwthread_thread_detach (glwthread_thread_t thread);