This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ecos + lwip


Mandeep Sandhu wrote:
On Thu, Sep 3, 2009 at 2:22 PM, Simon Kallweit<simon.kallweit@intefo.ch> 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.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]