Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 2004 22:51:14 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 56815 for review
Message-ID:  <200407082251.i68MpEDT030585@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56815

Change 56815 by davidxu@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407082251.i68MpEDT030585>