mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Rewrite Windows signal delivery system
This commit is contained in:
parent
00084577a3
commit
81f391dd22
19 changed files with 66 additions and 333 deletions
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_CALLS_SIGNALS_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_CALLS_SIGNALS_INTERNAL_H_
|
||||
#include "libc/atomic.h"
|
||||
#include "libc/calls/struct/sigset.h"
|
||||
#include "libc/calls/ucontext.h"
|
||||
#include "libc/nt/struct/context.h"
|
||||
|
@ -19,32 +18,19 @@ struct Delivery {
|
|||
struct NtContext *nc;
|
||||
};
|
||||
|
||||
struct Signal {
|
||||
struct Signal *next;
|
||||
bool used;
|
||||
int tid;
|
||||
int sig;
|
||||
int si_code;
|
||||
};
|
||||
|
||||
struct Signals {
|
||||
uint64_t sigmask; /* only if tls is disabled */
|
||||
struct Signal *queue;
|
||||
struct Signal mem[__SIG_QUEUE_LENGTH];
|
||||
uint64_t mask;
|
||||
uint64_t pending;
|
||||
uint64_t count;
|
||||
};
|
||||
|
||||
extern struct Signals __sig;
|
||||
extern atomic_long __sig_count;
|
||||
|
||||
bool __sig_check(int);
|
||||
bool __sig_is_core(int);
|
||||
bool __sig_is_fatal(int);
|
||||
bool __sig_is_ignored(int);
|
||||
bool __sig_handle(int, int, int, ucontext_t *);
|
||||
int __sig_add(int, int, int);
|
||||
int __sig_mask(int, const sigset_t *, sigset_t *);
|
||||
void __sig_check_ignore(const int, const unsigned);
|
||||
void __sig_pending(sigset_t *);
|
||||
int __sig_is_applicable(struct Signal *);
|
||||
bool __sig_deliver(int, int, int, ucontext_t *);
|
||||
int __sig_tramp(struct Delivery *);
|
||||
bool32 __sig_notify(int, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue