From: daniel.baluta@gmail.com (Daniel Baluta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: query regarding kernel daemon
Date: Mon, 4 Apr 2011 12:45:20 +0300 [thread overview]
Message-ID: <BANLkTimFnBhnad33SqqqOGykBf=hO3GkXQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTim6StdO_DFJC+L=baWXwm25fNm=XA@mail.gmail.com>
> A daemon sleeps in the background. User can enter a string through the proc
> interface. Whenever a string is entered, the daemon is woke. The daemon
> keeps a copy of the last entered string in a variable. Initially the
> variable is initialized to NULL. When the daemon wakes, it checks if the
> string entered is same as the previous one or a new string is entered. When
> the string is entered, in case the new or the old strings are NULL, or in
> case the entered string is same as the old string the daemon goes back to
> sleep (with the help of the function interruptible_sleep_on().
Don't use interruptible_sleep_on use wait_event* instead.
thanks,
Daniel.
[1] http://lxr.linux.no/linux+v2.6.38/include/linux/wait.h#L570
next prev parent reply other threads:[~2011-04-04 9:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 9:28 query regarding kernel daemon shubham sharma
2011-04-04 9:45 ` Daniel Baluta [this message]
2011-04-05 6:40 ` Mulyadi Santosa
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='BANLkTimFnBhnad33SqqqOGykBf=hO3GkXQ@mail.gmail.com' \
--to=daniel.baluta@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).