mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Overhaul Windows signal handling
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.
This commit is contained in:
parent
8bdaddd81d
commit
99dc1281f5
38 changed files with 635 additions and 279 deletions
|
@ -23,9 +23,7 @@
|
|||
|
||||
#ifdef __x86_64__
|
||||
|
||||
// TODO(jart): uc_sigmask support
|
||||
|
||||
privileged void _ntcontext2linux(ucontext_t *ctx, const struct NtContext *cr) {
|
||||
textwindows void _ntcontext2linux(ucontext_t *ctx, const struct NtContext *cr) {
|
||||
if (!cr) return;
|
||||
ctx->uc_mcontext.eflags = cr->EFlags;
|
||||
ctx->uc_mcontext.rax = cr->Rax;
|
||||
|
@ -52,7 +50,7 @@ privileged void _ntcontext2linux(ucontext_t *ctx, const struct NtContext *cr) {
|
|||
__repmovsb(&ctx->__fpustate, &cr->FltSave, sizeof(ctx->__fpustate));
|
||||
}
|
||||
|
||||
privileged void _ntlinux2context(struct NtContext *cr, const ucontext_t *ctx) {
|
||||
textwindows void _ntlinux2context(struct NtContext *cr, const ucontext_t *ctx) {
|
||||
if (!cr) return;
|
||||
cr->EFlags = ctx->uc_mcontext.eflags;
|
||||
cr->Rax = ctx->uc_mcontext.rax;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue