cosmopolitan/libc/calls/cp.internal.h
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00

24 lines
616 B
C

#ifndef COSMOPOLITAN_LIBC_CALLS_CP_INTERNAL_H_
#define COSMOPOLITAN_LIBC_CALLS_CP_INTERNAL_H_
COSMOPOLITAN_C_START_
int begin_cancelation_point(void);
void end_cancelation_point(int);
#ifndef MODE_DBG
#define BEGIN_CANCELATION_POINT (void)0
#define END_CANCELATION_POINT (void)0
#else
#define BEGIN_CANCELATION_POINT \
do { \
int _Cp; \
_Cp = begin_cancelation_point()
#define END_CANCELATION_POINT \
end_cancelation_point(_Cp); \
} \
while (0)
#endif
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_CP_INTERNAL_H_ */