From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: moreau francis <francis_moreau2000@yahoo.fr>
Cc: mb@bu3sch.de, linux-kernel@vger.kernel.org
Subject: Re: [HW_RNG] How to use generic rng in kernel space
Date: Tue, 01 Aug 2006 14:29:54 +0100 [thread overview]
Message-ID: <1154438995.15540.5.camel@localhost.localdomain> (raw)
In-Reply-To: <20060801120937.69641.qmail@web25813.mail.ukl.yahoo.com>
Ar Maw, 2006-08-01 am 12:09 +0000, ysgrifennodd moreau francis:
> Another question about the implementation. If O_NONBLOCK
> flag is passed when opening /dev/hw_random, how does the
> read method ensure that the caller won't sleep since it calls
> mutex_lock_interruptible() function unconditiannaly ? I must
> miss something but don't know what...
O_NONBLOCK doesn't necessarily imply "never sleep", it implies "don't
sleep waiting for an event/long time". So where the mutex is just
serializing access to hardware that will be very brief it is fine not to
check O_NONBLOCK/FNDELAY.
next prev parent reply other threads:[~2006-08-01 13:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 12:09 [HW_RNG] How to use generic rng in kernel space moreau francis
2006-08-01 13:29 ` Alan Cox [this message]
2006-08-01 13:28 ` Re : " moreau francis
2006-08-01 20:49 ` Michael Buesch
2006-08-04 13:00 ` Re : " moreau francis
2006-08-04 21:08 ` Michael Buesch
2006-08-05 1:44 ` Jeff Garzik
2006-08-08 15:39 ` Re : " moreau francis
2006-08-08 17:34 ` Michael Buesch
2006-08-09 10:02 ` Re : " moreau francis
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=1154438995.15540.5.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=francis_moreau2000@yahoo.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@bu3sch.de \
/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