lkml.org 
[lkml]   [2009]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Event notification when sysfs attribute changes
On Wed, Aug 12, 2009 at 16:26, Rick L. Vinyard, Jr.<rvinyard@cs.nmsu.edu> wrote:
> I'd like to allow userspace applications to track and display state
> changes (without polling) in a driver that exports attributes via sysfs.
>
> What is the best way to notify userspace applications when a sysfs
> exported attribute changes?
>
> In particular I wanted to drive the notification in the *_store() function
> of the sysfs attribute.
>
> Also, ideally, the mechanism would allow multiple userspace applications
> to hook into the notification.

There is nothing like this which works out-of-the-box. It needs kernel
support for every attribute that should be able to do that. Then
poll() can block until the kernel signifies a change, and return with
ERR, so the listener wakes up and can read the attribute again.

Kay


\
 
 \ /
  Last update: 2009-08-12 16:35    [W:0.048 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site