lkml.org 
[lkml]   [2001]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.6 possible problem
Well,

> 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/

\
 
 \ /
  Last update: 2005-03-22 13:17    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog