From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25951 invoked by alias); 21 Oct 2003 14:30:37 -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 25922 invoked from network); 21 Oct 2003 14:30:36 -0000 Received: from unknown (HELO londo.lunn.ch) (80.238.139.98) by sources.redhat.com with SMTP; 21 Oct 2003 14:30:36 -0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1ABxWr-0005FU-00; Tue, 21 Oct 2003 16:30:33 +0200 Date: Tue, 21 Oct 2003 14:30:00 -0000 To: James Yates Cc: "Ecos Discuss (E-mail)" Message-ID: <20031021143033.GA20070@lunn.ch> Mail-Followup-To: James Yates , "Ecos Discuss (E-mail)" References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: Andrew Lunn Subject: Re: [ECOS] Scheduler problems, thread delay X-SW-Source: 2003-10/txt/msg00361.txt.bz2 On Tue, Oct 21, 2003 at 03:23:44PM +0100, James Yates wrote: > 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 semaphore that the other is waiting for etc etc. This > all works fine and I can have 2 threads flashing 2 different leds, > continually giving control to each other by 2 semaphores. I tried > removing the semaphores and placing a small delay after each LED > flash to see if the two threads would each be allowed to run. This > didn't work and after some investigation, when I make a call to > cyg_thread_delay, this never seems to return and so hangs. I have > read lots in the archives of the mailing lists regarding similar > problems 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. Its probably your clock is broken. Try running the clock* tests. Check your setup of the timer, make sure you are getting timer interrupts etc. > Strangely, I have also tried testing hal_delay_us which works and provides me with the correct delay. This busy waits so does not need interrupts. Andrew -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss