diff options
author | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:35:58 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:35:58 +0200 |
commit | 6f520fb1dd6fcc2caeb2fc9fed9140f5d96f84a7 (patch) | |
tree | b0a2b4ff3ed1701fe7710c9bdb5841fd1bfd18c9 /lib/windows-thread.h | |
parent | f249808baa3f4f30386185b53bd6ac053a1272e1 (diff) | |
download | gnulib-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.h | 3 |
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); |