timer_list for FreeBSD?
M. Warner Losh
imp at bsdimp.com
Wed Nov 23 23:03:02 PST 2005
In message: <20051124032041.CE1F31F50DE at ws1-2.us4.outblaze.com>
"Yong Ma" <mayong at mail.com> writes:
: I tryed to make it with sleep(),but failed:
:
: ...
: #include <unistd.h>
: ...
: sec=10; //wait for ten seconds
: while(GetStatus() && sec-->0){
: dosomething();
: sleep(1);
: }
: ...
: complied successfully and made the xxx.ko,but when kldload ./xxx.ko it told me can't load,I don't know why!
sleep(3) isn't available in the kernel. You'll need to use tsleep(9) or
msleep(9) to accomplish the waiting.
Warner
More information about the freebsd-drivers
mailing list