From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9219 invoked by alias); 25 Jun 2008 12:22:40 -0000 Received: (qmail 9209 invoked by uid 22791); 25 Jun 2008 12:22:39 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jun 2008 12:22:17 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1KBU0q-00069B-00; Wed, 25 Jun 2008 14:22:12 +0200 Date: Wed, 25 Jun 2008 12:23:00 -0000 From: Andrew Lunn To: Yong Chen Tan Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20080625122212.GI14100@lunn.ch> Mail-Followup-To: Yong Chen Tan , ecos-discuss@ecos.sourceware.org References: <48621BA8.3000101@mlbassoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] ecos-discuss@ecos.sourceware.org X-SW-Source: 2008-06/txt/msg00153.txt.bz2 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