Date: Sun, 15 Mar 2009 11:43:18 -0700 (PDT) From: Barney Cordoba <barney_cordoba@yahoo.com> To: Julian Elischer <julian@elischer.org> Cc: current@freebsd.org Subject: Re: Is there a delay which yields? Message-ID: <808304.73330.qm@web63904.mail.re1.yahoo.com> In-Reply-To: <49BD37FB.7060101@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--- On Sun, 3/15/09, Julian Elischer <julian@elischer.org> wrote: > From: Julian Elischer <julian@elischer.org> > Subject: Re: Is there a delay which yields? > To: barney_cordoba@yahoo.com > Cc: current@freebsd.org > Date: Sunday, March 15, 2009, 1:16 PM > Barney Cordoba wrote: > > I'd expect DELAY to yield till timeout but a task > with a delay loop just > > runs to 100% usage. Is there a function which can > yield exectution for > > a set amount of time (without having to use a timer)? > > DELAY is designe for use early in the boot when thre are no > timers. > it is only occasionally used for cases during normal > operation. > > how would a thread know how long it has been away if no > timer is used? I guess I mean a sleep. Also, this is a kernel driver. I have a device which requires a toggle with a 10ms delay between pulses. I hate to tie up the cpu for 10ms with a delay. Sort of like the following: write_pulse(); delay(10000); write_pulse(); Barney
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?808304.73330.qm>