lkml.org 
[lkml]   [2002]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel notification to user space task
> I want my driver running in kernel to send a notification to this task when
> it detects some event.
>
> for example..if my driver detects that interface 'eth0' is coming up, it
> should send a indication to user task saying 'network interface eth0 is up'

I think it's kind of FAQ. Have a thread waiting in your driver
with add_wait_queue and schedule(). When awoken, the even thread
can signal the main worker thread or do the job itself.

But first, make sure you are not served better with an
event driven main thread (e.g. open a file descriptor
into your driver, then use select() on it together with
all other of your descriptors).

-- Pete
-
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:25    [W:0.027 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site