From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-serial@vger.kernel.org
Subject: Re: low_latency flag
Date: Fri, 21 Nov 2003 23:43:38 +0100 [thread overview]
Message-ID: <20031121224338.GI1037@lug-owl.de> (raw)
In-Reply-To: <bpm18m$73f$1@sea.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Fri, 2003-11-21 16:59:50 -0500, Chuck Messenger <chuckm@rochester.rr.com>
wrote in message <bpm18m$73f$1@sea.gmane.org>:
> Luckily, I happened to notice a recent message on this list with the
> word "low_latency". This led me to discover the low_latency flag, which
> you can set with "setserial /dev/ttyS0 low_latency". This sets a
> special mode on the port, which defeats some kernel-level buffering. I
> don't (yet) know how to set this mode programmatically -- I just call
> system("...") from my code (yech!).
Looking at setserial's sources, something like this:
struct serial_struct serinfo;
fd = open ("/dev/ttySxx");
ioctl (fd, TIOCGSERIAL, &serinfo);
serinfo.flags |= 0x4000;
ioctl (fd, TIOCSSERIAL, &serinfo);
close (fd);
should do. Of course, not tested and missing all error handling:-(
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-11-21 22:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-20 21:38 DTD required (was Re: Trouble reading from my serial device ( a microcontroller)) Ed Vance
2003-11-21 2:47 ` Serial Howto suggestions (was Re: Trouble reading from my serial device...) Chuck Messenger
2003-11-21 5:29 ` Gary Frerking
2003-11-21 21:59 ` low_latency flag Chuck Messenger
2003-11-21 22:43 ` Jan-Benedict Glaw [this message]
2003-11-21 23:37 ` Chuck Messenger
2003-11-22 5:32 ` Serial Howto suggestions (was Re: Trouble reading from my serial device...) David Lawyer
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=20031121224338.GI1037@lug-owl.de \
--to=jbglaw@lug-owl.de \
--cc=linux-serial@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