Skip to content

Commit

Permalink
x86_64: set up signal trampoline in context initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 26, 2024
1 parent 002f2e7 commit f756686
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform/x86_64/sched/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ int platformSetContext(Thread *t, uintptr_t entry, uintptr_t highest, const char
/* this sets up an entry point for the thread that's something like
* void _start(const char **argv, const char **envp) */

if(platformSignalSetup(t)) return -1;

ThreadContext *ctx = (ThreadContext *)t->context;
ctx->regs.rip = entry;
ctx->regs.rdi = (uint64_t)argv;
Expand Down

0 comments on commit f756686

Please sign in to comment.