> funct()
> {
> size_t ticks;
> wait_queue_head_t wqhead;
> init_waitqueue_head(&wqhead);
>
> ticks = 1 * HZ; /* For 1 second */
> while((ticks = interruptible_sleep_on_timeout(&wqhead, ticks)) > 0)
> ;
> }
Well, this works.
The question is: should I call init_waitqueue_head() every time I call
interruptible_sleep_on_timeout() or is it enough to call it once in init_module() ?
Another one: should I call wake_up_interruptible() to release pending request?
-- Regards, Alex
-- Alex Ivchenko, Ph.D. United Electronic Industries, Inc. "The High-Performance Alternative (tm)"-- 10 Dexter Avenue Watertown, Massachusetts 02472 Tel: (617) 924-1155 x 222 Fax: (617) 924-1441 http://www.ueidaq.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/