PDA

View Full Version : How to sleep in kernel ?


bsd_newbie
March 19th, 2009, 06:44
I'd like to put a delay for 1 second in my driver somewhere. What is the bsd function to do that. Basically this is for debugging only as I want printfs to be printed out slowly...

I am thinking of putting DELAY(1000000), let me know if that makes sense.
-thanks in advance.
bn

bsd_newbie
March 19th, 2009, 17:24
Delay is fine, but seems it is a busy loop. What I want is a 1 second cpu relinquishable sleep.

thanks.

Maledictus
March 19th, 2009, 22:35
man 9 pause