Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern provide curthread for dtrace
details: https://anonhg.NetBSD.org/src/rev/e6c5afa54ac5
branches: trunk
changeset: 340862:e6c5afa54ac5
user: christos <christos%NetBSD.org@localhost>
date: Wed Oct 07 00:32:34 2015 +0000
description:
provide curthread for dtrace
diffstat:
sys/kern/kern_runq.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r 36c4ab166547 -r e6c5afa54ac5 sys/kern/kern_runq.c
--- a/sys/kern/kern_runq.c Tue Oct 06 22:13:39 2015 +0000
+++ b/sys/kern/kern_runq.c Wed Oct 07 00:32:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_runq.c,v 1.43 2014/08/03 19:14:24 wiz Exp $ */
+/* $NetBSD: kern_runq.c,v 1.44 2015/10/07 00:32:34 christos Exp $ */
/*
* Copyright (c) 2007, 2008 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -27,7 +27,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.43 2014/08/03 19:14:24 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.44 2015/10/07 00:32:34 christos Exp $");
+
+#include "opt_dtrace.h"
#include <sys/param.h>
#include <sys/kernel.h>
@@ -121,6 +123,10 @@
static struct callout balance_ch; /* Callout of balancer */
#endif
+#ifdef KDTRACE_HOOKS
+struct lwp *curthread;
+#endif
+
void
runq_init(void)
{
@@ -712,6 +718,9 @@
/* Scheduler-specific hook */
sched_pstats_hook(l, batch);
+#ifdef KDTRACE_HOOKS
+ curthread = l;
+#endif
}
/*
Home |
Main Index |
Thread Index |
Old Index