mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 03:02:28 +00:00
Write more tests for signal handling
There's now a much stronger level of assurance that signaling on Windows will be atomic, low-latency, low tail latency, and shall never deadlock.
This commit is contained in:
parent
0e59afb403
commit
dd8c4dbd7d
19 changed files with 407 additions and 75 deletions
|
@ -47,6 +47,9 @@ textwindows int __sig_mask(int how, const sigset_t *neu, sigset_t *old) {
|
|||
} else { // SIG_SETMASK
|
||||
oldmask = atomic_exchange_explicit(mask, *neu, memory_order_acq_rel);
|
||||
}
|
||||
if (_weaken(__sig_check)) {
|
||||
_weaken(__sig_check)();
|
||||
}
|
||||
} else {
|
||||
oldmask = atomic_load_explicit(mask, memory_order_acquire);
|
||||
}
|
||||
|
@ -56,10 +59,6 @@ textwindows int __sig_mask(int how, const sigset_t *neu, sigset_t *old) {
|
|||
*old = oldmask;
|
||||
}
|
||||
|
||||
if (_weaken(__sig_check)) {
|
||||
_weaken(__sig_check)();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue