aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tcb.c1
-rw-r--r--src/uapi/proc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/tcb.c b/src/tcb.c
index 93ce502..64d95a5 100644
--- a/src/tcb.c
+++ b/src/tcb.c
@@ -149,6 +149,7 @@ struct tcb *create_thread(struct tcb *p)
* structure, this works on riscv but in the event that other
* systems don't we can easily turn this into a clone_uvmem. */
t->proc.vmem = p->proc.vmem;
+ t->callback = p->callback;
}
else {
if (!(t->proc.vmem = create_vmem())) {
diff --git a/src/uapi/proc.c b/src/uapi/proc.c
index b90433f..a99acb5 100644
--- a/src/uapi/proc.c
+++ b/src/uapi/proc.c
@@ -42,6 +42,7 @@ SYSCALL_DEFINE5(create)(struct tcb *t, sys_arg_t func,
* core_bringup() is doing, might separate this out into its own
* function? */
alloc_stack(c);
+ set_thread(c);
set_ret5(c, c->tid, d0, d1, d2, d3);
set_return(c, func);