Re: sleep in freebsd kernel

From: John-Mark Gurney <gurney_j_at_resnet.uoregon.edu>
Date: Sun, 4 Feb 2007 19:39:25 -0800
lu ping wrote this message on Sat, Feb 03, 2007 at 16:28 -0500:
> I have a question about making my kernel thread sleep for a while. I think I
> can use "tsleep", but the timeout for this call is only counted as system
> ticks (usually at millisecond granularity). However I want to make my
> "sleep" return in microsecond granularity. Does anybody know how to realize
> this?

Take a look at DELAY(9)...  This busy waits instead of sleeping...

FreeBSD currently doesn't have a method to make a kernel thread sleep
for sub-hz granularity...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
Received on Mon Feb 05 2007 - 03:17:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:05 UTC