From 6f520fb1dd6fcc2caeb2fc9fed9140f5d96f84a7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 15 Jul 2019 02:35:58 +0200 Subject: 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. --- lib/windows-thread.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/windows-thread.h') 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); -- cgit v1.2.1