summaryrefslogtreecommitdiff
path: root/src/thread/pthread_spin_lock.c
blob: 9e43f47539d6dad5661936900ffb20e0c9c36b50 (plain) (blame)
1
2
3
4
5
6
7
#include "pthread_impl.h"

int pthread_spin_lock(pthread_spinlock_t *s)
{
	while (*s || a_xchg(s, 1));
	return 0;
}