Date: Thu, 7 Aug 2014 16:49:50 +0000 (UTC) From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269669 - in head/sys: kern sys Message-ID: <53e3ae2e.2b48.41ea6a03@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Thu Aug 7 16:49:50 2014 New Revision: 269669 URL: http://svnweb.freebsd.org/changeset/base/269669 Log: Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant and export the kern_ version needed by an upcoming linuxolator change. MFC after: 3 days Sponsored by: DARPA,AFRL Modified: head/sys/kern/kern_time.c head/sys/sys/syscallsubr.h Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Thu Aug 7 16:40:24 2014 (r269668) +++ head/sys/kern/kern_time.c Thu Aug 7 16:49:50 2014 (r269669) @@ -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: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Thu Aug 7 16:40:24 2014 (r269668) +++ head/sys/sys/syscallsubr.h Thu Aug 7 16:49:50 2014 (r269669) @@ -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?53e3ae2e.2b48.41ea6a03>