Date: Sat, 16 Aug 2014 12:59:48 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270042 - in stable/10/sys: kern sys Message-ID: <201408161259.s7GCxmNT028776@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Sat Aug 16 12:59:47 2014 New Revision: 270042 URL: http://svnweb.freebsd.org/changeset/base/270042 Log: MFC r269669: Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant and export the kern_ version needed by an upcoming linuxolator change. Sponsored by: DARPA,AFRL Modified: stable/10/sys/kern/kern_time.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Sat Aug 16 10:47:24 2014 (r270041) +++ stable/10/sys/kern/kern_time.c Sat Aug 16 12:59:47 2014 (r270042) @@ -1361,13 +1361,20 @@ struct timer_getoverrun_args { int sys_ktimer_getoverrun(struct thread *td, struct ktimer_getoverrun_args *uap) { + + return (kern_ktimer_getoverrun(td, uap->timerid)); +} + +int +kern_ktimer_getoverrun(struct thread *td, int timer_id) +{ struct proc *p = td->td_proc; struct itimer *it; int error ; PROC_LOCK(p); - if (uap->timerid < 3 || - (it = itimer_find(p, uap->timerid)) == NULL) { + if (timer_id < 3 || + (it = itimer_find(p, timer_id)) == NULL) { PROC_UNLOCK(p); error = EINVAL; } else { Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Sat Aug 16 10:47:24 2014 (r270041) +++ stable/10/sys/sys/syscallsubr.h Sat Aug 16 12:59:47 2014 (r270042) @@ -239,6 +239,7 @@ int kern_ktimer_settime(struct thread *t struct itimerspec *val, struct itimerspec *oval); int kern_ktimer_gettime(struct thread *td, int timer_id, struct itimerspec *val); +int kern_ktimer_getoverrun(struct thread *td, int timer_id); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408161259.s7GCxmNT028776>