[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #20021] conn->sem is only signaled one-way
From: |
Jonathan Larmour |
Subject: |
[lwip-devel] [bug #20021] conn->sem is only signaled one-way |
Date: |
Fri, 01 Jun 2007 11:36:06 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060513 Fedora/1.0.8-1.1.fc3.1.legacy Firefox/1.0.8 |
Follow-up Comment #6, bug #20021 (project lwip):
Just to clarify something from the original submission that I mentioned on
the mailing list, the semaphore is not waited on only once. It is waited also
in this part of netconn_write:
while ((sndbuf = tcp_sndbuf(conn->pcb.tcp)) == 0) {
sys_sem_wait(conn->sem);
if (conn->err != ERR_OK) {
goto ret;
}
>From what I can see the code here (and in sent_tcp) is treating the semaphore
as a binary semaphore not a counting semaphore.
I think there would be race conditions with the suggested solution of
something that tries to indicate that someone's waiting.
I think it would be easiest to set down that lwIP expects binary semaphores
only.
Alternatively, you can move the current send buffer test into the tcp/ip
thread (so the caller thread effectively always waits, and its up to the
tcpip thread to whether it resumes). We had already talked about this in
fact, because the call to tcp_sndbuf is a race condition already.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?20021>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Kieran Mansley, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Frédéric Bernon, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Frédéric Bernon, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way,
Jonathan Larmour <=
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Jonathan Larmour, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Kieran Mansley, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Jonathan Larmour, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Jonathan Larmour, 2007/06/01
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/19
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/21
- [lwip-devel] [bug #20021] conn->sem is only signaled one-way, Simon Goldschmidt, 2007/06/21