From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8404 invoked by alias); 14 Feb 2008 13:10:52 -0000 Received: (qmail 8394 invoked by uid 22791); 14 Feb 2008 13:10:51 -0000 X-Spam-Check-By: sourceware.org Received: from mail2.ultra-uems.ca (HELO exchange.Ultra-UEMS.ca) (142.176.234.162) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 14 Feb 2008 13:10:13 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 14 Feb 2008 13:10:00 -0000 Message-ID: From: "Davies, Greg" To: 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: [ECOS] Pthread problem X-SW-Source: 2008-02/txt/msg00094.txt.bz2 Hi, I'm having problems when I try to run more than two pthreads at the same time. This is on a SAM7SE-EK board using the SAM7S-EK eCos configuration.=20 The threads start up correctly and I hit the main loop of all of them. Inside each main loop is a sched_yield() after it's done the main work. After the last thread yields, control never returns to one of my threads. I tried taking out all the yields, and letting ecos' preemption take care of when to switch context, but when I do that, I only ever hit the main loop of one of my threads. I also thought it might be a problem with the priority of the created threads being lower than that of the idle thread, but I haven't explored that possibility yet.=20 Is there something different about the way pthreads work in eCos (the same code ran in linux)? I using the library the way I should be, should I be sleeping instead of yielding? Could there be a configuration item that could be causing this? -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss