Currently I'm using the usec_sleep() function. However, this is a busy
loop. I would like to use one that suspends my process until the
amount of time (in milliseconds) has elapsed. Is there another sleep
function that I can use?
tswait() with a dummy semaphore initialized to zero. The timeout is specified in
clock ticks. For millisecond resolution, you'll have to set the clock tick rate
to 1000Hz.
Thanks for the replay....but Newbie here.
How do I change the clock tick rate to 1000 Hz?
I'm not sure, it's been about 5 years since I last worked with 4.0. I think,
maybe change the TICKSPERSEC constant in /usr/include/conf.h to 1000 and rebuild
the kernel? (make sure conf.o is rebuilt)
--
Cyril
Is there another way, I'm doing a device driver and I need the driver
to sleep awhile instead of doing a busy wait. Changing the TICKSPERSEC
is not an option.
Another way is to wait with the default resolution (10ms).