svn commit: r223989 - head/sys/dev/usb/input

Andriy Gapon avg at FreeBSD.org
Mon Aug 29 14:33:04 UTC 2011


on 29/08/2011 17:27 Hans Petter Selasky said the following:
> On Monday 29 August 2011 15:25:08 Andriy Gapon wrote:
>> Another question - why ukbd_yield() is needed?
>> Why kern_yield() would not be good here?
>> What are the priority manipulations in ukbd_yield?
>> Not saying that the code is incorrect, just that this is not explained in
>> the commit message.
> 
> This is needed during mountroot prompt, to allow the worker threads of the USB 
> code to run, because the mountroot code is like:
> 
> while (1) {
>   cngetc();
> }
> 
> instead of:
> 
> while (1) {
>   cngetc();
>   pause("WAIT_A_BIT", 1);
> }

Not sure if this answers my question, which is not about pause vs ukbd_yield, but
is about ukbd_yield vs kern_yield.
In other words, why you couldn't simply use kern_yield where you used ukbd_yield?


-- 
Andriy Gapon


More information about the svn-src-head mailing list