this further reduces the number of source files which need to include libc.h and thereby be potentially exposed to libc global state and internals. this will also facilitate further improvements like adding an inline fast-path, if we want to do so later.
10 lines
169 B
C
10 lines
169 B
C
#ifndef LOCK_H
|
|
#define LOCK_H
|
|
|
|
hidden void __lock(volatile int *);
|
|
hidden void __unlock(volatile int *);
|
|
#define LOCK(x) __lock(x)
|
|
#define UNLOCK(x) __unlock(x)
|
|
|
|
#endif
|