From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26599 invoked by alias); 3 Sep 2009 09:04:00 -0000 Received: (qmail 26403 invoked by uid 22791); 3 Sep 2009 09:03:59 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_42 X-Spam-Check-By: sourceware.org Received: from mail05.solnet.ch (HELO mail05.solnet.ch) (212.101.4.139) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Sep 2009 09:03:54 +0000 Received: from mail05.solnet.ch ([127.0.0.1]) by localhost (mail05.solnet.ch [127.0.0.1]) (SolNet-Check, port 10024) with LMTP id eEqTsezZNL-5; Thu, 3 Sep 2009 09:03:52 +0000 (UTC) Received: from beta.intefo.ch (static-212-101-18-64.adsl.solnet.ch [212.101.18.64]) by mail05.solnet.ch (Postfix) with ESMTP id E8ACB39A23; Thu, 3 Sep 2009 09:03:51 +0000 (UTC) Received: from beta.intefo.ch ([127.0.0.1]) by localhost (beta.intefo.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9ha31T1nyyHN; Thu, 3 Sep 2009 11:03:51 +0200 (CEST) Received: from [192.168.1.20] (simon.intefo.ch [192.168.1.20]) by beta.intefo.ch (Postfix) with ESMTP id 5A6D477026B; Thu, 3 Sep 2009 11:03:51 +0200 (CEST) Message-ID: <4A9F8A38.9040503@intefo.ch> Date: Thu, 03 Sep 2009 09:04:00 -0000 From: Simon Kallweit User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Mandeep Sandhu CC: ecos-discuss References: <4A9D43DB.4090506@intefo.ch> <4A9E9147.6070609@intefo.ch> <4A9F83BF.7040209@intefo.ch> <4A9F86A0.9070004@intefo.ch> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 + lwip X-SW-Source: 2009-09/txt/msg00050.txt.bz2 Mandeep Sandhu wrote: > On Thu, Sep 3, 2009 at 2:34 PM, Simon Kallweit wrote: >> Mandeep Sandhu wrote: >>> On Thu, Sep 3, 2009 at 2:22 PM, Simon Kallweit >>> wrote: >>>> Mandeep Sandhu wrote: >>>> There is a semaphore created in cyg_lwip_sequential_init() which will >>>> block >>>> until all initialization (including ethernet devices) in the tcpip thread >>>> is >>>> done. Therefore it's priority does not matter. cyg_lwip_sequential_init() >>>> should not return before initialization is completed. >>>> >>>> I just reviewed the code and found that the semaphore is initialized with >>>> 1, >>>> which is clearly a bug, it should be initialized with 0 so that the >>>> following call to cyg_semaphore_wait() is actually blocking the thread >>>> until >>>> initialization is done. >>>> >>>> My mistake, sorry! Hope it works as intended now. New release: >>>> >>>> http://download.westlicht.ch/lwip-20090903.tar.gz >>> Thanks Simon. I totally missed the sem init part...i guess since the sem >>> is >>> init to 1...the thread never actually waits...and thats why I was seeing >>> the >>> problem. >> Exactly. I glanced over this code more than once and it didn't occur to me. >> Thanks a lot for testing! This is really helpful. > > No problem. I'm just glad I'm able to help. > > I downloaded your new rel. It still had that sem init'ed to 1! That should be > 0 right? If thats the only change I'll do it in my local copy and test it. Oh my, git tricked me :) Yeah, this should be 0. Please see if that works. It did for me, before git tricked me, hehe Simon -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss