diff options
author | markm <markm@FreeBSD.org> | 2003-11-20 15:35:48 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-11-20 15:35:48 +0000 |
commit | 6a2f4748c445fb8d14b96292eb3eebc4b1d7ebf3 (patch) | |
tree | 3e94ea38c41e945cf21d08b665e850511809f4bc /sys/kern/kern_intr.c | |
parent | dced91d8f3c525ce50e8b61814028cfd393c983f (diff) | |
download | FreeBSD-src-6a2f4748c445fb8d14b96292eb3eebc4b1d7ebf3.zip FreeBSD-src-6a2f4748c445fb8d14b96292eb3eebc4b1d7ebf3.tar.gz |
Fix a major faux pas of mine. I was causing 2 very bad things to
happen in interrupt context; 1) sleep locks, and 2) malloc/free
calls.
1) is fixed by using spin locks instead.
2) is fixed by preallocating a FIFO (implemented with a STAILQ)
and using elements from this FIFO instead. This turns out
to be rather fast.
OK'ed by: re (scottl)
Thanks to: peter, jhb, rwatson, jake
Apologies to: *
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 87b3c9b..e42cd10 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -356,9 +356,7 @@ ok: int ithread_schedule(struct ithd *ithread, int do_switch) { -#if 0 struct int_entropy entropy; -#endif struct thread *td; struct thread *ctd; struct proc *p; @@ -370,7 +368,6 @@ ithread_schedule(struct ithd *ithread, int do_switch) return (EINVAL); ctd = curthread; -#if 0 /* * If any of the handlers for this ithread claim to be good * sources of entropy, then gather some. @@ -381,7 +378,6 @@ ithread_schedule(struct ithd *ithread, int do_switch) random_harvest(&entropy, sizeof(entropy), 2, 0, RANDOM_INTERRUPT); } -#endif td = ithread->it_td; p = td->td_proc; |