Hey, I put processes to sleep but they don't wake up
probably, the ISR or routine that wakes them happens between when you tell the device to do its thing and when you want to go to sleep. So instead of using
interruptible_sleep_on(&(the_element->wq));
Instead do...
wait_event_interruptible(the_element->wq,
the_element->state == WAKE_LIMBO);
...where
the_element->state == WAKE_LIMBO is a condition set in the ISR.
Seems to run indefinitely. So, the moral of the story is:
If you're going to sleep and the even that can wake you could happen in a very short period of time, have some variable get set in your ISR and use the wait_event_interruptible() version of the function.
How to assign ioctl numbers:
see
http://www.linuxhq.com/kernel/v2.0/doc/ioctl-number.txt.html
Code to print out stuff whether in the kernel or a user space program
#ifdef __KERNEL__
#include <linux/kernel.h>
#define KU_PRINT(fmt, args...) printk(KERN_WARNING "" fmt, ## args)
#else
#define KU_PRINT(fmt, args...) printf("" fmt, ## args)
#endif
--
MattWalsh - 27 Mar 2002