Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/cloudabi32/cloudabi32_sysvec.c
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | cloudabi32_fetch_syscall_args(struct thread *td) | ||||
struct syscall_args *sa; | struct syscall_args *sa; | ||||
int error; | int error; | ||||
frame = td->td_frame; | frame = td->td_frame; | ||||
sa = &td->td_sa; | sa = &td->td_sa; | ||||
/* Obtain system call number. */ | /* Obtain system call number. */ | ||||
sa->code = frame->tf_r12; | sa->code = frame->tf_r12; | ||||
sa->original_code = sa->code; | |||||
if (sa->code >= CLOUDABI32_SYS_MAXSYSCALL) | if (sa->code >= CLOUDABI32_SYS_MAXSYSCALL) | ||||
return (ENOSYS); | return (ENOSYS); | ||||
sa->callp = &cloudabi32_sysent[sa->code]; | sa->callp = &cloudabi32_sysent[sa->code]; | ||||
/* Fetch system call arguments from registers and the stack. */ | /* Fetch system call arguments from registers and the stack. */ | ||||
sa->args[0] = frame->tf_r0; | sa->args[0] = frame->tf_r0; | ||||
sa->args[1] = frame->tf_r1; | sa->args[1] = frame->tf_r1; | ||||
sa->args[2] = frame->tf_r2; | sa->args[2] = frame->tf_r2; | ||||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |