From: Timur Tabi <timur@freescale.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-kernel@vger.kernel.org, Kumar Gala <kumar.gala@freescale.com>
Subject: Re: Best method for sending messages to user space?
Date: Tue, 21 Oct 2008 15:23:16 -0500 [thread overview]
Message-ID: <48FE3A34.5040105@freescale.com> (raw)
In-Reply-To: <e9c3a7c20810211316i13610410h5ec022b55c248c6a@mail.gmail.com>
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
next prev parent reply other threads:[~2008-10-21 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 17:54 Best method for sending messages to user space? Timur Tabi
2008-10-21 18:14 ` Dan Williams
2008-10-21 19:43 ` Timur Tabi
2008-10-21 20:16 ` Dan Williams
2008-10-21 20:23 ` Timur Tabi [this message]
2008-10-21 20:42 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48FE3A34.5040105@freescale.com \
--to=timur@freescale.com \
--cc=dan.j.williams@intel.com \
--cc=kumar.gala@freescale.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox