mirror of
https://github.com/fluencelabs/musl
synced 2025-04-24 23:02:14 +00:00
19 lines
268 B
C
19 lines
268 B
C
#ifndef __NR_restart_syscall
|
|
#include <syscall.h>
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define a_barrier() (0)
|
|
|
|
#define a_cas a_cas
|
|
static inline int a_cas(volatile int *p, int t, int s)
|
|
{
|
|
int old = *p;
|
|
if (old == t)
|
|
*p = s;
|
|
return old;
|
|
}
|
|
|
|
#define a_crash() abort()
|