mailing list of musl libc
 help / color / mirror / code / Atom feed
cf0397f73f97d066119e4075131b19e2ee11819c blob 397 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 
#include "pthread_impl.h"
#include <threads.h>

int __pthread_join(pthread_t, void **);

static int __pthread_detach(pthread_t t)
{
	/* Cannot detach a thread that's already exiting */
	if (a_cas(t->exitlock, 0, -INT_MAX))
		return __pthread_join(t, 0);
	t->detached = 2;
	UNLOCK(t->exitlock);
	return 0;
}

weak_alias(__pthread_detach, pthread_detach);
weak_alias(__pthread_detach, thrd_detach);
debug log:

solving cf0397f7 ...
found cf0397f7 in https://inbox.vuxu.org/musl/c297c1026324e022af845f651ec57e5cfa1a6dc9.1498228733.git.Jens.Gustedt@inria.fr/
found 818626ed in https://inbox.vuxu.org/musl/868874$8age42@mail2-relais-roc.national.inria.fr/ ||
	https://inbox.vuxu.org/musl/868874$8aqkr1@mail2-relais-roc.national.inria.fr/ ||
	https://inbox.vuxu.org/musl/b03752f80540ecb4310c53f97e0834268b740ea5.1498228733.git.Jens.Gustedt@inria.fr/
found ed77f74d in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 ed77f74d520bff3a16ef5e055f08bbf021fe91d4	src/thread/pthread_detach.c

applying [1/4] https://inbox.vuxu.org/musl/868874$8age42@mail2-relais-roc.national.inria.fr/
diff --git a/src/thread/pthread_detach.c b/src/thread/pthread_detach.c
index ed77f74d..818626ed 100644

Checking patch src/thread/pthread_detach.c...
Applied patch src/thread/pthread_detach.c cleanly.

skipping https://inbox.vuxu.org/musl/868874$8aqkr1@mail2-relais-roc.national.inria.fr/ for 818626ed
skipping https://inbox.vuxu.org/musl/b03752f80540ecb4310c53f97e0834268b740ea5.1498228733.git.Jens.Gustedt@inria.fr/ for 818626ed
index at:
100644 818626edab1ae01916278e256d75d497edff7040	src/thread/pthread_detach.c

applying [2/4] https://inbox.vuxu.org/musl/c297c1026324e022af845f651ec57e5cfa1a6dc9.1498228733.git.Jens.Gustedt@inria.fr/
diff --git a/src/thread/pthread_detach.c b/src/thread/pthread_detach.c
index 818626ed..cf0397f7 100644

Checking patch src/thread/pthread_detach.c...
Applied patch src/thread/pthread_detach.c cleanly.

index at:
100644 cf0397f73f97d066119e4075131b19e2ee11819c	src/thread/pthread_detach.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).