PERFORCE change 78647 for review
John Baldwin
jhb at FreeBSD.org
Thu Jun 16 19:43:23 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=78647
Change 78647 by jhb at jhb_slimer on 2005/06/16 19:42:33
Add some extra witness checks to catch threads exiting with locks held.
Affected files ...
.. //depot/projects/smpng/sys/kern/kern_exit.c#95 edit
.. //depot/projects/smpng/sys/kern/kern_kse.c#20 edit
Differences ...
==== //depot/projects/smpng/sys/kern/kern_exit.c#95 (text+ko) ====
@@ -505,6 +505,8 @@
wakeup(p->p_pptr);
PROC_UNLOCK(p->p_pptr);
+ WITNESS_WARN(WARN_PANIC, &p->p_mtx, "process (pid %d) exiting",
+ p->p_pid);
mtx_lock_spin(&sched_lock);
critical_exit();
==== //depot/projects/smpng/sys/kern/kern_kse.c#20 (text+ko) ====
@@ -1304,7 +1304,7 @@
thread_export_context(td, 0);
/*
* There is something to report, and we own an upcall
- * strucuture, we can go to userland.
+ * structure, we can go to userland.
* Turn ourself into an upcall thread.
*/
td->td_pflags |= TDP_UPCALLING;
@@ -1313,6 +1313,8 @@
PROC_LOCK(p);
if (kg->kg_upsleeps)
wakeup(&kg->kg_completed);
+ WITNESS_WARN(WARN_PANIC, &p->p_mtx,
+ "thread exiting in userret");
mtx_lock_spin(&sched_lock);
thread_stopped(p);
thread_exit();
More information about the p4-projects
mailing list