lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5960] Enable multithread send/recv operations on sa


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5960] Enable multithread send/recv operations on same socket on TCP netconns
Date: Sat, 26 May 2007 12:53:41 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #31, patch #5960 (project lwip):

So, to fix the problem "one thread read, another one write on a tcp
connection" to support full duplex on a TCP connection, I propose the
solution:

- add a "sys_sem_t apisem;" in the "struct netconn" in "api.h".
- in "tcpip.c", lock the connection to protect concurrent access in
"tcpip_apimsg()",  adding a sys_sem_wait(apimsg->msg.conn->apisem) and a
sys_sem_signal(apimsg->msg.conn->apisem).

Like this, the problem is solved. To avoid a such protection if users doesn't
need it, I propose to add a LWIP_API_MULTITHREAD_PROT in opt.h.

Agree for you?


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5960>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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