diff options
author | kib <kib@FreeBSD.org> | 2013-07-20 13:39:41 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-07-20 13:39:41 +0000 |
commit | 82f12b623790126df303a34e4411b60d2dbef6bb (patch) | |
tree | d12367b3f2f85d553f4b7f85302bd00bec301df0 /sys/compat/freebsd32 | |
parent | e36ca7ff41a890c53e3b4d3dfbbf90501f1f2cb8 (diff) | |
download | FreeBSD-src-82f12b623790126df303a34e4411b60d2dbef6bb.zip FreeBSD-src-82f12b623790126df303a34e4411b60d2dbef6bb.tar.gz |
id_t is 64bit, provide the compat32 wrapper for clock_getcpuclockid2(2).
Reported and tested by: Petr Salinger <Petr.Salinger@seznam.cz>
PR: threads/180652
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 14 | ||||
-rw-r--r-- | sys/compat/freebsd32/syscalls.master | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index dd8d4f7..cfcd83b 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2332,6 +2332,20 @@ freebsd32_clock_getres(struct thread *td, } int +freebsd32_clock_getcpuclockid2(struct thread *td, + struct freebsd32_clock_getcpuclockid2_args *uap) +{ + clockid_t clk_id; + int error; + + error = kern_clock_getcpuclockid2(td, PAIR32TO64(id_t, uap->id), + uap->which, &clk_id); + if (error == 0) + error = copyout(&clk_id, uap->clock_id, sizeof(clockid_t)); + return (error); +} + +int freebsd32_thr_new(struct thread *td, struct freebsd32_thr_new_args *uap) { diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index bcca754..6cb649f 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -457,8 +457,9 @@ 244 AUE_NULL UNIMPL nosys 245 AUE_NULL UNIMPL nosys 246 AUE_NULL UNIMPL nosys -247 AUE_NULL NOPROTO { int clock_getcpuclockid2(id_t id,\ - int which, clockid_t *clock_id); } +247 AUE_NULL STD { int freebsd32_clock_getcpuclockid2(\ + uint32_t id1, uint32_t id2,\ + int which, clockid_t *clock_id); } 248 AUE_NULL UNIMPL ntp_gettime 249 AUE_NULL UNIMPL nosys ; syscall numbers initially used in OpenBSD |