From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19529 invoked by alias); 21 Oct 2003 14:22:25 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 19426 invoked from network); 21 Oct 2003 14:22:24 -0000 Received: from unknown (HELO sand4.gxn.net) (195.147.249.239) by sources.redhat.com with SMTP; 21 Oct 2003 14:22:24 -0000 Received: from ip02.quartzelec.adsl.gxn.net ([195.147.203.154] helo=server2000.Quartz.local) by sand4.gxn.net with esmtp (Exim 4.20) id 1ABxMD-0004t6-0V for ecos-discuss@sources.redhat.com; Tue, 21 Oct 2003 15:19:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Date: Tue, 21 Oct 2003 14:22:00 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "James Yates" To: "Ecos Discuss (E-mail)" Subject: [ECOS] Scheduler problems, thread delay X-SW-Source: 2003-10/txt/msg00359.txt.bz2 I have been having problems trying to get timeslicing to work. I have successfully created a two threaded app, both at the same priority, = one waits on a semaphore, one it gets it, it flashes a led and posts a sema= phore that the other is waiting for etc etc. This all works fine and I can have 2 threads flashing 2 different leds, con= tinually giving control to each other by 2 semaphores. I tried removing the semaphores and placing a small delay after each LED f= lash to see if the two threads would each be allowed to run. This didn't wo= rk and after some investigation, when I make a call to cyg_thread_delay, th= is never seems to return and so hangs. I have read lots in the archives of the mailing lists regarding similar pro= blems but nothing seems to work. I have tried running some of the tests, basic and context HAL tests run. I = tried running some of the kernel tests, bin_sem2 failed. I looked into the = code for the test and have traced it hanging at a call to cyg_thread_delay. Strangely, I have also tried testing hal_delay_us which works and provides = me with the correct delay. Does anyone have any idea what is wrong. I am really stuck again. Many than= ks in advance. James Yates -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss