public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ecos-discuss@ecos.sourceware.org
@ 2008-06-25 10:19 Yong Chen Tan
  2008-06-25 11:10 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Yong Chen Tan @ 2008-06-25 10:19 UTC (permalink / raw)
  To: ecos-discuss



Hi, I got some doubts regarding the multi-threading.
I experience some problems when i do multi-threading.
The thread seems to stuck at the scanf function. Is it normal? Are there ways to solve this problem?
 
Is eCos multithreading - cooperative or preemptive?


_________________________________________________________________
Easily publish your photos to your Spaces with Photo Gallery.
http://get.live.com/photogallery/overview

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] ecos-discuss@ecos.sourceware.org
  2008-06-25 10:19 [ECOS] ecos-discuss@ecos.sourceware.org Yong Chen Tan
@ 2008-06-25 11:10 ` Gary Thomas
  2008-06-25 12:22   ` Yong Chen Tan
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2008-06-25 11:10 UTC (permalink / raw)
  To: Yong Chen Tan; +Cc: ecos-discuss

Yong Chen Tan wrote:
> 
> Hi, I got some doubts regarding the multi-threading.
> I experience some problems when i do multi-threading.
> The thread seems to stuck at the scanf function. Is it normal? Are there ways to solve this problem?

What's the source of your input?  Notice that the default console (haldiag) does
non-interrupt I/O (in fact with interrupts disabled) and will definitely block
all other threads from running.

If you want interruptable console I/O, you'll need to enable the serial drivers.
Check the archives for lengthy discussions on this point.

> Is eCos multithreading - cooperative or preemptive?

Preemptive.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] ecos-discuss@ecos.sourceware.org
  2008-06-25 11:10 ` Gary Thomas
@ 2008-06-25 12:22   ` Yong Chen Tan
  2008-06-25 12:23     ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Yong Chen Tan @ 2008-06-25 12:22 UTC (permalink / raw)
  To: ecos-discuss


Hi, for my case is two threads running.
One thread is a menu printed on the hyperterminal and scanf is used to check for user input.
Another thread is to run a simple 7 Seg LED from 0-9 on  ARM Board.

So the thread for the 7 Seg LED is stuck at the scanf thread.
How should it be solved? Puzzled...


> Date: Wed, 25 Jun 2008 04:19:20 -0600
> From: gary@mlbassoc.com
> To: oricon776@hotmail.com
> CC: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] ecos-discuss@ecos.sourceware.org
>
> Yong Chen Tan wrote:
>>
>> Hi, I got some doubts regarding the multi-threading.
>> I experience some problems when i do multi-threading.
>> The thread seems to stuck at the scanf function. Is it normal? Are there ways to solve this problem?
>
> What's the source of your input? Notice that the default console (haldiag) does
> non-interrupt I/O (in fact with interrupts disabled) and will definitely block
> all other threads from running.
>
> If you want interruptable console I/O, you'll need to enable the serial drivers.
> Check the archives for lengthy discussions on this point.
>
>> Is eCos multithreading - cooperative or preemptive?
>
> Preemptive.
>
> --
> ------------------------------------------------------------
> Gary Thomas | Consulting for the
> MLB Associates | Embedded world
> ------------------------------------------------------------
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>

_________________________________________________________________
NEW! Get Windows Live FREE.
http://www.get.live.com/wl/all

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] ecos-discuss@ecos.sourceware.org
  2008-06-25 12:22   ` Yong Chen Tan
@ 2008-06-25 12:23     ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2008-06-25 12:23 UTC (permalink / raw)
  To: Yong Chen Tan; +Cc: ecos-discuss

On Wed, Jun 25, 2008 at 12:19:00PM +0000, Yong Chen Tan wrote:
> 
> Hi, for my case is two threads running.
> One thread is a menu printed on the hyperterminal and scanf is used to check for user input.
> Another thread is to run a simple 7 Seg LED from 0-9 on  ARM Board.
> 
> So the thread for the 7 Seg LED is stuck at the scanf thread.
> How should it be solved? Puzzled...

Please don't top post.

> > Date: Wed, 25 Jun 2008 04:19:20 -0600
> > From: gary@mlbassoc.com
> > To: oricon776@hotmail.com
> > CC: ecos-discuss@ecos.sourceware.org
> > Subject: Re: [ECOS] ecos-discuss@ecos.sourceware.org
> >
> > Yong Chen Tan wrote:
> >>
> >> Hi, I got some doubts regarding the multi-threading.
> >> I experience some problems when i do multi-threading.
> >> The thread seems to stuck at the scanf function. Is it normal? Are there ways to solve this problem?
> >
> > What's the source of your input? Notice that the default console (haldiag) does
> > non-interrupt I/O (in fact with interrupts disabled) and will definitely block
> > all other threads from running.
> >
> > If you want interruptable console I/O, you'll need to enable the serial drivers.
> > Check the archives for lengthy discussions on this point.


Do as Gary said here.... Enable the interrupt driver serial device
driver and use /dev/ser0, or /dev/tty0 as appropriate.

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-25 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-25 10:19 [ECOS] ecos-discuss@ecos.sourceware.org Yong Chen Tan
2008-06-25 11:10 ` Gary Thomas
2008-06-25 12:22   ` Yong Chen Tan
2008-06-25 12:23     ` Andrew Lunn

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).