What is the best way to introduce delay in kernel ?

M. Warner Losh imp at bsdimp.com
Thu Apr 14 16:07:21 PDT 2005


In message: <20050412145401.GA17895 at stud.fit.vutbr.cz>
            Divacky Roman <xdivac02 at stud.fit.vutbr.cz> writes:
: On Tue, Apr 12, 2005 at 06:01:52PM +0530, Dipjyoti Saikia wrote:
: > Hi ,
: > 
: > I am writing a device driver and using  DELAY() to intoduce delays in
: > my code .Are there any better ways of doing the same for FreeBSD 4.10
: > ?
: 
: 
: you can use [tm]sleep for this... or with another approach callouts might be
: usefull

DELAY is useful for short delays (< 1-2hz), while [tm]sleep are useful
for longer delays.

Warner


More information about the freebsd-hackers mailing list