Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/linux32/linux32_machdep.c
Show First 20 Lines • Show All 562 Lines • ▼ Show 20 Lines | linux_pause(struct thread *td, struct linux_pause_args *args) | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
sigmask = td->td_sigmask; | sigmask = td->td_sigmask; | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
return (kern_sigsuspend(td, sigmask)); | return (kern_sigsuspend(td, sigmask)); | ||||
} | } | ||||
int | int | ||||
linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap) | |||||
{ | |||||
stack_t ss, oss; | |||||
l_stack_t lss; | |||||
int error; | |||||
if (uap->uss != NULL) { | |||||
error = copyin(uap->uss, &lss, sizeof(l_stack_t)); | |||||
if (error) | |||||
return (error); | |||||
ss.ss_sp = PTRIN(lss.ss_sp); | |||||
ss.ss_size = lss.ss_size; | |||||
ss.ss_flags = linux_to_bsd_sigaltstack(lss.ss_flags); | |||||
} | |||||
error = kern_sigaltstack(td, (uap->uss != NULL) ? &ss : NULL, | |||||
(uap->uoss != NULL) ? &oss : NULL); | |||||
if (!error && uap->uoss != NULL) { | |||||
lss.ss_sp = PTROUT(oss.ss_sp); | |||||
lss.ss_size = oss.ss_size; | |||||
lss.ss_flags = bsd_to_linux_sigaltstack(oss.ss_flags); | |||||
error = copyout(&lss, uap->uoss, sizeof(l_stack_t)); | |||||
} | |||||
return (error); | |||||
} | |||||
int | |||||
linux_gettimeofday(struct thread *td, struct linux_gettimeofday_args *uap) | linux_gettimeofday(struct thread *td, struct linux_gettimeofday_args *uap) | ||||
{ | { | ||||
struct timeval atv; | struct timeval atv; | ||||
l_timeval atv32; | l_timeval atv32; | ||||
struct timezone rtz; | struct timezone rtz; | ||||
int error = 0; | int error = 0; | ||||
if (uap->tp) { | if (uap->tp) { | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |