PERFORCE change 56815 for review
David Xu
davidxu at FreeBSD.org
Thu Jul 8 15:51:15 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=56815
Change 56815 by davidxu at davidxu_alona on 2004/07/08 22:50:22
More actively check upcall events.
Affected files ...
.. //depot/projects/davidxu_ksedbg/src/sys/kern/kern_kse.c#3 edit
Differences ...
==== //depot/projects/davidxu_ksedbg/src/sys/kern/kern_kse.c#3 (text+ko) ====
@@ -1127,11 +1127,17 @@
mtx_lock_spin(&sched_lock);
td->td_flags &= ~TDF_USTATCLOCK;
mtx_unlock_spin(&sched_lock);
- if (kg->kg_completed ||
- (td->td_upcall->ku_flags & KUF_DOUPCALL))
- thread_user_enter(p, td);
}
+ /*
+ * Check if we should unbind and schedule upcall
+ * after returned from interrupt or etcs.
+ */
+ if (td->td_mailbox == NULL && ku != NULL &&
+ !(td->td_pflags & TDP_UPCALLING) &&
+ (kg->kg_completed || ku->ku_flags & KUF_DOUPCALL))
+ thread_user_enter(p, td);
+
uts_crit = (td->td_mailbox == NULL);
/*
* Optimisation:
More information about the p4-projects
mailing list