Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/cloudabi64/cloudabi64_sysvec.c
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | cloudabi64_thread_setregs(struct thread *td, | ||||
const cloudabi64_threadattr_t *attr, uint64_t tcb) | const cloudabi64_threadattr_t *attr, uint64_t tcb) | ||||
{ | { | ||||
struct trapframe *frame; | struct trapframe *frame; | ||||
stack_t stack; | stack_t stack; | ||||
/* Perform standard register initialization. */ | /* Perform standard register initialization. */ | ||||
stack.ss_sp = (void *)attr->stack; | stack.ss_sp = (void *)attr->stack; | ||||
stack.ss_size = attr->stack_size; | stack.ss_size = attr->stack_size; | ||||
cpu_set_upcall_kse(td, (void *)attr->entry_point, NULL, &stack); | cpu_set_upcall(td, (void *)attr->entry_point, NULL, &stack); | ||||
/* | /* | ||||
* Pass in the thread ID of the new thread and the argument | * Pass in the thread ID of the new thread and the argument | ||||
* pointer provided by the parent thread in as arguments to the | * pointer provided by the parent thread in as arguments to the | ||||
* entry point. | * entry point. | ||||
*/ | */ | ||||
frame = td->td_frame; | frame = td->td_frame; | ||||
frame->tf_x[0] = td->td_tid; | frame->tf_x[0] = td->td_tid; | ||||
Show All 35 Lines |