Date: Mon, 29 Aug 2011 17:33:00 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Hans Petter Selasky <hselasky@FreeBSD.org> Cc: "svn-src-head@FreeBSD.org" <svn-src-head@FreeBSD.org>, "svn-src-all@FreeBSD.org" <svn-src-all@FreeBSD.org>, "src-committers@FreeBSD.org" <src-committers@FreeBSD.org> Subject: Re: svn commit: r223989 - head/sys/dev/usb/input Message-ID: <4E5BA31C.7070103@FreeBSD.org> In-Reply-To: <201108291627.42477.hselasky@freebsd.org> References: <201107132107.p6DL7ojq099900@svn.freebsd.org> <4E5B9334.5020502@FreeBSD.org> <201108291627.42477.hselasky@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E5BA31C.7070103>