Date: Sun, 18 Jul 2004 03:28:57 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 57583 for review Message-ID: <200407180328.i6I3SvAA072134@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=57583 Change 57583 by davidxu@davidxu_alona on 2004/07/18 03:28:41 Call thread_user_enter() in ast(), so thread_userret needn't call it. Affected files ... .. //depot/projects/davidxu_ksedbg/src/sys/kern/kern_kse.c#8 edit .. //depot/projects/davidxu_ksedbg/src/sys/kern/subr_trap.c#5 edit Differences ... ==== //depot/projects/davidxu_ksedbg/src/sys/kern/kern_kse.c#8 (text+ko) ==== @@ -373,7 +373,8 @@ error = copyout(&sigset, &ku->ku_mailbox->km_sigscaught, sizeof(sigset)); } else { - if (! kg->kg_completed && !(ku->ku_flags & KUF_DOUPCALL)) { + if (((ku->ku_mflags & KMF_NOCOMPLETED) || + !kg->kg_completed) && !(ku->ku_flags & KUF_DOUPCALL)) { kg->kg_upsleeps++; td->td_kflags |= TDK_KSEREL; error = msleep(&kg->kg_completed, &p->p_mtx, @@ -424,7 +425,7 @@ kg = td->td_ksegrp; if (kg->kg_upsleeps) { mtx_unlock_spin(&sched_lock); - wakeup_one(&kg->kg_completed); + wakeup(&kg->kg_completed); PROC_UNLOCK(p); return (0); } @@ -1135,18 +1136,6 @@ td->td_pflags &= ~TDP_USTATCLOCK; } -#if 0 - /* - * Check if we should unbind and schedule upcall - * after returned from interrupt or etcs, this - * is usually true when process is being debugged. - */ - 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); -#endif - uts_crit = (td->td_mailbox == NULL); /* * Optimisation: @@ -1190,7 +1179,7 @@ * XXXKSE Maybe wake all of them up. */ if (kg->kg_upsleeps) - wakeup_one(&kg->kg_completed); + wakeup(&kg->kg_completed); mtx_lock_spin(&sched_lock); thread_stopped(p); thread_exit(); @@ -1336,7 +1325,6 @@ PROC_LOCK_ASSERT(p, MA_OWNED); mtx_assert(&sched_lock, MA_OWNED); - return; if (!(p->p_flag & P_SA)) return; ==== //depot/projects/davidxu_ksedbg/src/sys/kern/subr_trap.c#5 (text+ko) ====
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407180328.i6I3SvAA072134>