mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 00:38:31 +00:00
Change sigaction_f to match sysv signature (#585)
This commit is contained in:
parent
33b5b5b312
commit
263711965f
23 changed files with 46 additions and 35 deletions
|
@ -3127,7 +3127,7 @@ static void OnlyRunOnFirstCpu(void) {
|
|||
sched_setaffinity(0, sizeof(bs), &bs);
|
||||
}
|
||||
|
||||
static void OnSignal(int sig, siginfo_t *si, ucontext_t *uc) {
|
||||
static void OnSignal(int sig, siginfo_t *si, void *uc) {
|
||||
EnqueueSignal(m, sig, si->si_code);
|
||||
}
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ void OnAlrm(int sig) {
|
|||
++gotalrm;
|
||||
}
|
||||
|
||||
void OnChld(int sig, siginfo_t *si, ucontext_t *ctx) {
|
||||
void OnChld(int sig, siginfo_t *si, void *ctx) {
|
||||
if (!gotchld++) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &signalled);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
static int pid;
|
||||
|
||||
static void RelaySig(int sig, struct siginfo *si, struct ucontext *uc) {
|
||||
static void RelaySig(int sig, struct siginfo *si, void *uc) {
|
||||
kill(pid, sig);
|
||||
}
|
||||
|
||||
|
|
|
@ -760,11 +760,11 @@ static void OnExit(void) {
|
|||
ioctl(out, TCSETS, &oldterm);
|
||||
}
|
||||
|
||||
static void OnSigInt(int sig, struct siginfo *sa, struct ucontext *uc) {
|
||||
static void OnSigInt(int sig, struct siginfo *sa, void *uc) {
|
||||
action |= INTERRUPTED;
|
||||
}
|
||||
|
||||
static void OnSigWinch(int sig, struct siginfo *sa, struct ucontext *uc) {
|
||||
static void OnSigWinch(int sig, struct siginfo *sa, void *uc) {
|
||||
action |= RESIZED;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,11 +219,11 @@ static void OnExit(void) {
|
|||
ioctl(out, TCSETS, &oldterm);
|
||||
}
|
||||
|
||||
static void OnSigInt(int sig, struct siginfo *sa, struct ucontext *uc) {
|
||||
static void OnSigInt(int sig, struct siginfo *sa, void *uc) {
|
||||
action |= INTERRUPTED;
|
||||
}
|
||||
|
||||
static void OnSigWinch(int sig, struct siginfo *sa, struct ucontext *uc) {
|
||||
static void OnSigWinch(int sig, struct siginfo *sa, void *uc) {
|
||||
action |= RESIZED;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
|
||||
volatile bool finished;
|
||||
|
||||
void OnSegmentationFault(int sig, siginfo_t *si, ucontext_t *ctx) {
|
||||
void OnSegmentationFault(int sig, siginfo_t *si, void *vctx) {
|
||||
struct XedDecodedInst xedd;
|
||||
ucontext_t *ctx = vctx;
|
||||
xed_decoded_inst_zero_set_mode(&xedd, XED_MACHINE_MODE_LONG_64);
|
||||
xed_instruction_length_decode(&xedd, (void *)ctx->uc_mcontext.rip, 15);
|
||||
ctx->uc_mcontext.rip += xedd.length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue