Skip to content

Commit

Permalink
x86_64: architecture-dependent sigreturn() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 27, 2024
1 parent 521d935 commit 65bdc0b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/platform/x86_64/ipc/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,13 @@ int platformSendSignal(Thread *sender, Thread *dest, int signum, uintptr_t handl
*stack = dest->signalTrampoline;

return 0;
}

/* platformSigreturn(): restores context before a signal handler was invoked
* params: t - thread to restore
* returns: nothing
*/

void platformSigreturn(Thread *t) {
memcpy(t->context, t->signalContext, PLATFORM_CONTEXT_SIZE);
}

0 comments on commit 65bdc0b

Please sign in to comment.