mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 15:38:22 +00:00
The new asynchronous signal delivery technique is now also being used for tkill(), raise(), etc. Many subtle issues have been addresesd. We now signal handling on Windows that's remarkably similar to the POSIX behaviors. However that's just across threads. We're lacking a way to have the signal semantics work well, across multiple WIN32 processes.
26 lines
748 B
C
26 lines
748 B
C
#ifndef COSMOPOLITAN_LIBC_CALLS_BO_INTERNAL_H_
|
|
#define COSMOPOLITAN_LIBC_CALLS_BO_INTERNAL_H_
|
|
#include "libc/dce.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
int begin_blocking_operation(void);
|
|
void end_blocking_operation(int);
|
|
|
|
#if SupportsWindows()
|
|
#define BEGIN_BLOCKING_OPERATION \
|
|
do { \
|
|
int _Flags; \
|
|
_Flags = begin_blocking_operation()
|
|
#define END_BLOCKING_OPERATION \
|
|
end_blocking_operation(_Flags); \
|
|
} \
|
|
while (0)
|
|
#else
|
|
#define BEGIN_BLOCKING_OPERATION (void)0
|
|
#define END_BLOCKING_OPERATION (void)0
|
|
#endif
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_BO_INTERNAL_H_ */
|