On 17-Jul-2002 Bruce Evans wrote:
> On Tue, 16 Jul 2002, John Baldwin wrote:
>> On 17-Jul-2002 Bruce Evans wrote:
>> >>         mtx_lock_spin(&sched_lock);
>> >>         if (cold || panicstr) {
>> >>                 /*
>> >>                  * After a panic, or during autoconfiguration,
>> >>                  * just give interrupts a chance, then just return;
>> >                           ^^^^^^^^^^^^^^^^^^^^^^^^
>> >
>> > This is the rotted comment.  No chance is given here.
>> Well, when you unlock sched_lock you give ithreads a chance to run.  (This
>> is only true in a fully preemptive kernel though.)
> It now only releases the lock that it aquired.  splx(safepri) gave a
> nesting-violating unlocking corresponding to releasing the caller(s)
> locks.  However, it is probably a bug to call msleep() with sched_lock
> held, so releasing sched_lock would release it completely but not give
> interrupts any better chance than they had to begin with.

Well, the only other locks the caller can hold is the mutex passed in
and we also release that as well, which could free up ithreads blocked
on that lock.

> Bruce


John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to