summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_intr.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-06 03:39:28 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-06 03:39:28 +0000
commit6680706c2bf89170fdfb9bd5bc9332aa7319a17a (patch)
treeb0aa387b5f5855b35997943772914216d07c1961 /sys/kern/kern_intr.c
parentb4bae139fdb215c76a40d08f96e4f9b338cf7393 (diff)
downloadFreeBSD-src-6680706c2bf89170fdfb9bd5bc9332aa7319a17a.zip
FreeBSD-src-6680706c2bf89170fdfb9bd5bc9332aa7319a17a.tar.gz
In ithread_schedule(), when we plan to go harvest some entropy as
a result of scheduling an ithread, cut a KTR_INTR trace record so that it's clear in tracing interrupt activity where and when the entropy harvesting code is invoked.
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r--sys/kern/kern_intr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 99283ff..267efac 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -379,19 +379,21 @@ ithread_schedule(struct ithd *ithread)
return (EINVAL);
ctd = curthread;
+ td = ithread->it_td;
+ p = td->td_proc;
/*
* If any of the handlers for this ithread claim to be good
* sources of entropy, then gather some.
*/
if (harvest.interrupt && ithread->it_flags & IT_ENTROPY) {
+ CTR3(KTR_INTR, "%s: pid %d (%s) gathering entropy", __func__,
+ p->p_pid, p->p_comm);
entropy.vector = ithread->it_vector;
entropy.proc = ctd->td_proc;
random_harvest(&entropy, sizeof(entropy), 2, 0,
RANDOM_INTERRUPT);
}
- td = ithread->it_td;
- p = td->td_proc;
KASSERT(p != NULL, ("ithread %s has no process", ithread->it_name));
CTR4(KTR_INTR, "%s: pid %d: (%s) need = %d",
__func__, p->p_pid, p->p_comm, ithread->it_need);
OpenPOWER on IntegriCloud