public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Robin Farine <acnrf@dial.eunet.ch>
Cc: Peter Graf <p.graf@itknet.de>, ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] sscanf() vs. fgetc()
Date: Thu, 12 Jul 2001 03:42:00 -0000	[thread overview]
Message-ID: <3B4D7F1B.6C5C9040@redhat.com> (raw)
In-Reply-To: <86sng24g1c.fsf@halftrack.hq.acn-group.ch>

Robin Farine wrote:
> 
> Hi Peter,
> 
> Peter Graf <p.graf@itknet.de> writes:
> 
> > Hi,
> >
> > after problems in a large context, I have cut things down to a short
> > example for a phenomenon I can't explain myself.
> >
> > I create and resume a new thread which uses fgetc() on a serial port, in an
> > infinite loop.
> > This new thread has a higher priority than the old one.
> > If no characters are received, fgetc blocks and the old thread continues.
> >
> > So far so good.
> >
> > But when I use sscanf() in the old thread, it hangs.
> > Even if the new process completes fgetc(), because characters are received,
> > the old process won't get any further.
> 
> I suppose that only one thread at a time can read characters from a serial
> port.

Yes, but *s*scanf() isn't reading from the serial port.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

  reply	other threads:[~2001-07-12  3:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-11 14:09 [ECOS] Linux over RedBoot Venkat Mynampati
2001-07-11 14:36 ` Jonathan Larmour
2001-07-11 14:53 ` Gary Thomas
2001-07-11 20:32   ` Fabrice Gautier
2001-07-11 23:37     ` Jesper Skov
2001-07-12  5:11       ` Gary Thomas
2001-07-12  5:30         ` Fabrice Gautier
2001-07-12  5:39           ` Gary Thomas
2001-07-12  5:45             ` Jesper Skov
2001-07-12  1:54 ` [ECOS] sscanf() vs. fgetc() Peter Graf
2001-07-12  3:23   ` Peter Graf
2001-07-12  3:28   ` Robin Farine
2001-07-12  3:42     ` Jonathan Larmour [this message]
2001-07-12  5:02       ` Robin Farine
2001-07-12  3:45     ` Peter Graf
2001-07-12  4:00   ` Jonathan Larmour
2001-07-12  5:57     ` Peter Graf
2001-07-12  6:13       ` Jonathan Larmour
2001-07-12  7:43         ` Peter Graf
2001-07-12 11:17           ` Robin Farine
2001-07-12 11:55             ` Jonathan Larmour
2001-07-13  2:33               ` Peter Graf
2001-07-13  2:33             ` Peter Graf

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=3B4D7F1B.6C5C9040@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=acnrf@dial.eunet.ch \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=p.graf@itknet.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).