Re: wake_up_interruptible problem

From: Richard B. Johnson
Date: Mon Dec 01 2003 - 11:41:57 EST


On -1 xxx -1, Juergen Oberhofer wrote:

> Hi,
> I'm trying to implement a timer, which on each timer interrupt wakes up
> every process that got blocked by a read call.
> My problem is the following: if I'm insmod'ing the module (I've attached the
> file) the execution gets
> blocked on the wake_up_interruptible(&timer_queue); call. If I'm
> uncommenting this line everything
> goes smooth and the timer counts without problems. Does somebody have a
> hint? Some ideas?
> Regards
> Juergen

Well you don't provide enough code to actually compile NotGood(tm).

I would guess that you failed to do:

init_waitqueue_head(&timer_queue);

... in your initialization code, so wake_up_interruptible() is
waiting forever...... Look at the drivers provided in the
kernel source. All the initialization stuff is mandatory.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/