diff options
author | 2019-01-18 20:55:19 +0000 | |
---|---|---|
committer | 2019-01-18 20:55:19 +0000 | |
commit | 70770d4e3629988ed1545492edb0ea09a69e751d (patch) | |
tree | 90e8dad3def2aeae925c7baffbecc4d8cdcb6819 | |
parent | Bring back the ip_pcbopts() refactor. Pad the option buffer and therefor (diff) | |
download | wireguard-openbsd-70770d4e3629988ed1545492edb0ea09a69e751d.tar.xz wireguard-openbsd-70770d4e3629988ed1545492edb0ea09a69e751d.zip |
no need to KERNEL_LOCK before calling ktrstruct() anymore; ok mpi@ visa@
-rw-r--r-- | sys/kern/kern_time.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 6ca3c157698..bea703e8d7d 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_time.c,v 1.107 2019/01/18 05:03:42 cheloha Exp $ */ +/* $OpenBSD: kern_time.c,v 1.108 2019/01/18 20:55:19 cheloha Exp $ */ /* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */ /* @@ -167,11 +167,8 @@ sys_clock_gettime(struct proc *p, void *v, register_t *retval) error = copyout(&ats, SCARG(uap, tp), sizeof(ats)); #ifdef KTRACE - if (error == 0 && KTRPOINT(p, KTR_STRUCT)) { - KERNEL_LOCK(); + if (error == 0 && KTRPOINT(p, KTR_STRUCT)) ktrabstimespec(p, &ats); - KERNEL_UNLOCK(); - } #endif return (error); } @@ -247,11 +244,8 @@ sys_clock_getres(struct proc *p, void *v, register_t *retval) if (SCARG(uap, tp)) { error = copyout(&ts, SCARG(uap, tp), sizeof (ts)); #ifdef KTRACE - if (error == 0 && KTRPOINT(p, KTR_STRUCT)) { - KERNEL_LOCK(); + if (error == 0 && KTRPOINT(p, KTR_STRUCT)) ktrreltimespec(p, &ts); - KERNEL_UNLOCK(); - } #endif } @@ -275,11 +269,8 @@ sys_nanosleep(struct proc *p, void *v, register_t *retval) if (error) return (error); #ifdef KTRACE - if (KTRPOINT(p, KTR_STRUCT)) { - KERNEL_LOCK(); + if (KTRPOINT(p, KTR_STRUCT)) ktrreltimespec(p, &request); - KERNEL_UNLOCK(); - } #endif if (request.tv_sec < 0 || request.tv_nsec < 0 || @@ -312,11 +303,8 @@ sys_nanosleep(struct proc *p, void *v, register_t *retval) if (copyout_error) error = copyout_error; #ifdef KTRACE - if (copyout_error == 0 && KTRPOINT(p, KTR_STRUCT)) { - KERNEL_LOCK(); + if (copyout_error == 0 && KTRPOINT(p, KTR_STRUCT)) ktrreltimespec(p, &remainder); - KERNEL_UNLOCK(); - } #endif } @@ -344,11 +332,8 @@ sys_gettimeofday(struct proc *p, void *v, register_t *retval) if ((error = copyout(&atv, tp, sizeof (atv)))) return (error); #ifdef KTRACE - if (KTRPOINT(p, KTR_STRUCT)) { - KERNEL_LOCK(); + if (KTRPOINT(p, KTR_STRUCT)) ktrabstimeval(p, &atv); - KERNEL_UNLOCK(); - } #endif } if (tzp) |