lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Best method for sending messages to user space?
Dan Williams wrote:

> fd = open("/sys/block/md0/md/array_state");
> do {
> read(buf, fd, len);
> act_on_message(buf);
> select(...); /* wait for next sysfs_notify event */
> lseek(fd, 0, SEEK_SET); /* seek back so we can read the new state */
> } while (1);

I meant from the kernel side. I added a call to sysfs_notify(), and I didn't
see any sysfs entries being created, so I presume I need to set up sysfs before
I call sysfs_notify(), but I can't figure out what that setup is.

--
Timur Tabi
Linux kernel developer at Freescale


\
 
 \ /
  Last update: 2008-10-21 22:27    [W:0.060 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site