Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/cloudabi64/cloudabi64_module.c
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | #define PTR(type, ptr) { .a_type = (type), .a_ptr = (uintptr_t)(ptr) } | ||||
PTR(CLOUDABI_AT_PHDR, args->phdr), | PTR(CLOUDABI_AT_PHDR, args->phdr), | ||||
VAL(CLOUDABI_AT_PHNUM, args->phnum), | VAL(CLOUDABI_AT_PHNUM, args->phnum), | ||||
VAL(CLOUDABI_AT_TID, td->td_tid), | VAL(CLOUDABI_AT_TID, td->td_tid), | ||||
#undef VAL | #undef VAL | ||||
#undef PTR | #undef PTR | ||||
{ .a_type = CLOUDABI_AT_NULL }, | { .a_type = CLOUDABI_AT_NULL }, | ||||
}; | }; | ||||
*stack_base -= howmany(sizeof(auxv), sizeof(register_t)); | *stack_base -= howmany(sizeof(auxv), sizeof(register_t)); | ||||
return (copyout(auxv, *stack_base, sizeof(auxv))); | error = copyout(auxv, *stack_base, sizeof(auxv)); | ||||
if (error != 0) | |||||
return (error); | |||||
/* Reserve space for storing the TCB. */ | |||||
*stack_base -= howmany(sizeof(cloudabi64_tcb_t), sizeof(register_t)); | |||||
return (0); | |||||
} | } | ||||
static int | static int | ||||
cloudabi64_modevent(module_t mod, int type, void *data) | cloudabi64_modevent(module_t mod, int type, void *data) | ||||
{ | { | ||||
switch (type) { | switch (type) { | ||||
case MOD_LOAD: | case MOD_LOAD: | ||||
Show All 27 Lines |