mailing list of musl libc
 help / color / mirror / code / Atom feed
0874c04a4c0a81a9fa0dc032479ec18cec81d8aa blob 230 bytes (raw)

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

void __lock(volatile int *l)
{
	if (libc.threads_minus_1)
		while (a_swap(l, 1)) __wait(l, l+1, 1, 1);
}

void __unlock(volatile int *l)
{
	if (l[0]) {
		a_store(l, 0);
		if (l[1]) __wake(l, 1, 1);
	}
}
debug log:

solving 0874c04 ...
found 0874c04 in https://git.vuxu.org/mirror/musl/

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).