Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Run Solaris cyclics from statclock() so dtrace isn'...
details: https://anonhg.NetBSD.org/src/rev/aa04cf78a38e
branches: trunk
changeset: 971922:aa04cf78a38e
user: ad <ad%NetBSD.org@localhost>
date: Fri May 08 22:10:08 2020 +0000
description:
Run Solaris cyclics from statclock() so dtrace isn't locked out by IPL_SCHED
(assuming the machine has a separate statclock() which almost all don't).
diffstat:
external/cddl/osnet/dev/cyclic/cyclic.c | 4 ++--
sys/kern/kern_clock.c | 18 +++++++++---------
2 files changed, 11 insertions(+), 11 deletions(-)
diffs (64 lines):
diff -r 9642c955eb7d -r aa04cf78a38e external/cddl/osnet/dev/cyclic/cyclic.c
--- a/external/cddl/osnet/dev/cyclic/cyclic.c Fri May 08 22:01:54 2020 +0000
+++ b/external/cddl/osnet/dev/cyclic/cyclic.c Fri May 08 22:10:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cyclic.c,v 1.8 2018/05/28 21:05:02 chs Exp $ */
+/* $NetBSD: cyclic.c,v 1.9 2020/05/08 22:10:08 ad Exp $ */
/*
* CDDL HEADER START
@@ -347,7 +347,7 @@
#include <sys/xcall.h>
#undef mutex_init
-#define mtx_init(m, d, p, f) mutex_init(m, MUTEX_DEFAULT, IPL_CLOCK)
+#define mtx_init(m, d, p, f) mutex_init(m, MUTEX_DEFAULT, IPL_HIGH)
#define mtx_lock_spin(x) mutex_spin_enter(x)
#define mtx_unlock_spin(x) mutex_spin_exit(x)
#define mtx_destroy(x) mutex_destroy(x)
diff -r 9642c955eb7d -r aa04cf78a38e sys/kern/kern_clock.c
--- a/sys/kern/kern_clock.c Fri May 08 22:01:54 2020 +0000
+++ b/sys/kern/kern_clock.c Fri May 08 22:10:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_clock.c,v 1.140 2020/04/02 16:29:30 maxv Exp $ */
+/* $NetBSD: kern_clock.c,v 1.141 2020/05/08 22:10:09 ad Exp $ */
/*-
* Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.140 2020/04/02 16:29:30 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.141 2020/05/08 22:10:09 ad Exp $");
#ifdef _KERNEL_OPT
#include "opt_dtrace.h"
@@ -257,13 +257,6 @@
* Update real-time timeout queue.
*/
callout_hardclock();
-
-#ifdef KDTRACE_HOOKS
- cyclic_clock_func_t func = cyclic_clock_func[cpu_index(ci)];
- if (func) {
- (*func)((struct clockframe *)frame);
- }
-#endif
}
/*
@@ -431,6 +424,13 @@
atomic_inc_uint(&l->l_cpticks);
mutex_spin_exit(&p->p_stmutex);
}
+
+#ifdef KDTRACE_HOOKS
+ cyclic_clock_func_t func = cyclic_clock_func[cpu_index(ci)];
+ if (func) {
+ (*func)((struct clockframe *)frame);
+ }
+#endif
}
/*
Home |
Main Index |
Thread Index |
Old Index