Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/freebsd32/freebsd32_misc.c
Show First 20 Lines • Show All 2,913 Lines • ▼ Show 20 Lines | freebsd32_clock_gettime(struct thread *td, | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
int | int | ||||
freebsd32_clock_settime(struct thread *td, | freebsd32_clock_settime(struct thread *td, | ||||
struct freebsd32_clock_settime_args *uap) | struct freebsd32_clock_settime_args *uap) | ||||
{ | { | ||||
struct timespec ats; | struct timespec ats, ots; | ||||
struct timespec32 ats32; | struct timespec32 ats32, ots32; | ||||
int error; | int error; | ||||
error = copyin(uap->tp, &ats32, sizeof(ats32)); | error = copyin(uap->tp, &ats32, sizeof(ats32)); | ||||
if (error) | if (error != 0) | ||||
return (error); | return (error); | ||||
CP(ats32, ats, tv_sec); | CP(ats32, ats, tv_sec); | ||||
CP(ats32, ats, tv_nsec); | CP(ats32, ats, tv_nsec); | ||||
return (kern_clock_settime(td, uap->clock_id, &ats)); | error = kern_clock_settime(td, uap->clock_id, &ats, &ots); | ||||
if (error == 0 && uap->clock_id == CLOCK_ADJUST_REALTIME) { | |||||
CP(ots, ots32, tv_sec); | |||||
CP(ots, ots32, tv_nsec); | |||||
error = copyout(&ots32, __DECONST(void *, uap->tp), | |||||
sizeof(ots32)); | |||||
} | |||||
return (error); | |||||
} | } | ||||
int | int | ||||
freebsd32_clock_getres(struct thread *td, | freebsd32_clock_getres(struct thread *td, | ||||
struct freebsd32_clock_getres_args *uap) | struct freebsd32_clock_getres_args *uap) | ||||
{ | { | ||||
struct timespec ts; | struct timespec ts; | ||||
struct timespec32 ts32; | struct timespec32 ts32; | ||||
▲ Show 20 Lines • Show All 893 Lines • Show Last 20 Lines |