lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Antw: RE: [lwip-users] SemSignal gets called on aalreadysignaledsema


From: Jonathan Larmour
Subject: Re: Antw: RE: [lwip-users] SemSignal gets called on aalreadysignaledsemaphore
Date: Fri, 01 Jun 2007 00:12:33 +0100
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501)

Goldschmidt Simon wrote:

I think a better solution would be to redesign tcp_sent() to signal
the semaphore only if someone is really waiting.
Otherwise some OSes could throw errors if a binary semaphore is
signaled more than once.

I think it would be hard to deal with race conditions between testing that someone is waiting and doing the signal in one place, and setting that someone is waiting, and doing the wait in the other place.

Instead I think it would have to be down to the port to deal with it if the OS does that - they should be able to deal with it in an OS-specific way, whereas abstracting that in lwIP would be harder. So instead we can just expect the semaphore to be a pure binary one, with no problems associated with "extra" signals.

Or maybe it's better to change the abstraction to mutexes and condition variables, as has been discussed elsewhere :).

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]