Kernel Module Writing
How would you use sleep in a kernel module? would you suggest wait_event_interruptible()?
I want to use timed delays. Code:
would give me : Code:
root @ WhiteCastle ~ $ insmod /lib/modules/2.6.21.5-smp/kernel/drivers/misc/c_proj_hello_module-driver.ko Thanks for your help. |
You cannot sleep() in a kernel module. Take a look at wait_event_interruptible(). Also, if you want timed delays, take a look at setting/using timers and having them trigger interrupts to force a return from wait_event_interruptible().
|
Quote:
|
google is your friend.
At least, it is for things like this. |
Thanks...
|
When I googled for it I came up with pages of responses, including one for an online book about the Linux kernel, and a link to the online versions of the O'Reilly books about Linux device drivers. The O'Reilly book is the best resource, and it can be downloaded as HTML or as PDF. Don't have a link offhand, but it is out there.
|
Quote:
|
All times are GMT -5. The time now is 04:08 PM. |