plan9port/src/lib9/fmtlock2.c
Russ Cox 9505cd15a6 lib9: make formatting lock-free again
First use of <stdatomic.h>.
We will see if any supported systems don't have it yet.
(C11 was so last decade.)

Fixes #338.
2020-01-14 18:04:00 -05:00

16 lines
145 B
C

#include <u.h>
#include <libc.h>
static Lock fmtlock;
void
__fmtlock(void)
{
lock(&fmtlock);
}
void
__fmtunlock(void)
{
unlock(&fmtlock);
}