From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How to implement a driver's read and write operations with synchronization properly
Date: Tue, 29 Jul 2014 20:49:16 +0200 [thread overview]
Message-ID: <20140729184915.GK3694@debian> (raw)
In-Reply-To: <40703.1406643881@turing-police.cc.vt.edu>
On Tue, Jul 29, 2014 at 10:24:41AM -0400, Valdis.Kletnieks at vt.edu wrote:
> On Tue, 29 Jul 2014 20:59:08 +0700, Anh Le said:
>
> > still, user programs like bash could have a race problem by spliting
> > the input, I hope that they can somehow take care of this problem
> > themselves.
>
> stdio is *not* always your friend. fopen/fprintf is prone to splitting on
> bugger boundaries without your knowing about it, but most language bindings
> (including the Perl you tested with) allow you to use open/write and do the
> buffer management yourself
>
Actually, the Perl's IO layer did pretty little to the result, because
Anh used command line substitution:
echo $(perl -e "print 'a'x2000") > /dev/sample
Jonathan
next prev parent reply other threads:[~2014-07-29 18:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 13:59 How to implement a driver's read and write operations with synchronization properly Anh Le
2014-07-29 14:24 ` Valdis.Kletnieks at vt.edu
2014-07-29 18:49 ` Jonathan Neuschäfer [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-07-29 12:15 Anh Le
2014-07-29 12:33 ` Pranay Srivastava
2014-07-29 12:47 ` Jonathan Neuschäfer
2014-07-29 8:03 Anh Le
2014-07-29 8:36 ` Jonathan Neuschäfer
2014-07-29 11:59 ` Pranay Srivastava
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=20140729184915.GK3694@debian \
--to=j.neuschaefer@gmx.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.