Skip to contentSkip to conversation

kernel 2.6 hangs

DISCUSSION manomugdha biswas 1 participant 1 message Sep 17, 2005

lore
Share & tools
lore
#0 lore raw

Hi,
I have a driver module in kernel 2.6. I use ioctl to drive my module from user application. My driver module does the following:

When it is called (via ioctl from user application) it loops in a for loop at most 50 times. After each iteration i have used delay as below:

wait_queue_head_t wq;
init_waitqueue_head (&wq);

for (/* at most 50 times */) {
wait_event_timeout(wq, 0, HZ * 2);
/* wait_event_interruptible_timeout(wq, 0, HZ * 2); */ }

But this wait_event_timeout() causes my module to get hanged when this function is executed! I am saying that this function causes to get hanged because if I comment out this function then 'for' loop can iterate 50 times. When this function is being used after first iteration my module (and as well as well computer) gets hanged.

Could you please tell me what is wrong here or what I need to do?

Regards,
Mano

Manomugdha Biswas

__________________________________________________________
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com