diff options
author | julian <julian@FreeBSD.org> | 2004-08-31 06:12:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-08-31 06:12:13 +0000 |
commit | ee753ed190029f2bb1071fa1905073ad15121ae5 (patch) | |
tree | dddf557370c3f26fcb7ce5b74984fd362556bf89 /sys/kern | |
parent | d3a487d5866b728b29cf8da175a0ceae5e01eb2f (diff) | |
download | FreeBSD-src-ee753ed190029f2bb1071fa1905073ad15121ae5.zip FreeBSD-src-ee753ed190029f2bb1071fa1905073ad15121ae5.tar.gz |
Remove sched_free_thread() which was only used
in diagnostics. It has outlived its usefulness and has started
causing panics for people who turn on DIAGNOSTIC, in what is otherwise
good code.
MFC after: 2 days
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_fork.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_prot.c | 13 | ||||
-rw-r--r-- | sys/kern/subr_trap.c | 3 |
3 files changed, 0 insertions, 19 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 90f13c4..8451861 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -831,9 +831,6 @@ fork_exit(callout, arg, frame) kthread_exit(0); } PROC_UNLOCK(p); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif mtx_assert(&Giant, MA_NOTOWNED); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 2a0aafb..28905f2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1829,19 +1829,6 @@ crdup(struct ucred *cr) return (newcr); } -#ifdef DIAGNOSTIC -void -cred_free_thread(struct thread *td) -{ - struct ucred *cred; - - cred = td->td_ucred; - td->td_ucred = NULL; - if (cred != NULL) - crfree(cred); -} -#endif - /* * Fill in a struct xucred based on a struct ucred. * MPSAFE diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index fc129c4..ccdaa2d 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -261,8 +261,5 @@ ast(struct trapframe *framep) } userret(td, framep, sticks); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif mtx_assert(&Giant, MA_NOTOWNED); } |