From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9290 invoked by alias); 3 Sep 2009 08:55:12 -0000 Received: (qmail 9282 invoked by uid 22791); 3 Sep 2009 08:55:12 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_42,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f204.google.com (HELO mail-px0-f204.google.com) (209.85.216.204) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Sep 2009 08:55:07 +0000 Received: by pxi42 with SMTP id 42so1560614pxi.20 for ; Thu, 03 Sep 2009 01:55:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.196.20 with SMTP id t20mr208643wff.28.1251968105746; Thu, 03 Sep 2009 01:55:05 -0700 (PDT) In-Reply-To: <4A9F86A0.9070004@intefo.ch> References: <4A9D43DB.4090506@intefo.ch> <4A9E9147.6070609@intefo.ch> <4A9F83BF.7040209@intefo.ch> <4A9F86A0.9070004@intefo.ch> Date: Thu, 03 Sep 2009 08:55:00 -0000 Message-ID: From: Mandeep Sandhu To: Simon Kallweit Cc: ecos-discuss Content-Type: text/plain; charset=ISO-8859-1 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/msg00049.txt.bz2 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. -mandeep > > 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