PERFORCE change 56961 for review
David Xu
davidxu at FreeBSD.org
Sat Jul 10 07:18:55 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=56961
Change 56961 by davidxu at davidxu_alona on 2004/07/10 14:18:38
Add a comment.
Affected files ...
.. //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_priority_queue.c#3 edit
Differences ...
==== //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_priority_queue.c#3 (text+ko) ====
@@ -271,6 +271,16 @@
/* Mark the list as not being in the queue: */
pql->pl_queued = 0;
} else {
+ /*
+ * note there may be a suspension event during this
+ * test, If TMDF_DONOTRUNUSER is set after we tested it,
+ * we will run the thread, this seems be a problem,
+ * fortunatly, when we are being debugged, all context
+ * switch will be done by kse_switchin, that is a syscall,
+ * kse_switchin will check the flag again, the thread
+ * will be returned via upcall, so next time, UTS won't
+ * run the thread.
+ */
while (pthread != NULL && !THR_IN_CRITICAL(pthread) &&
(pthread->tcb->tcb_tmbx.tm_dflags &
TMDF_DONOTRUNUSER)) {
More information about the p4-projects
mailing list