Hi,

LwIP and FreeRTOS  are popular because they are open source and free.

If you understand how an OS works and have background in TCP/IP you should
not have a problem learning other TCP stack’s and/or other OS.

Finding a job is not only finding to work with something you are familiar with 
but
more than that. It is adapting/learning other systems and other tools.

If you only worked with LwIP RAW mode then I encourage you to learn some Socket
programing as this is much more common.

Most RT OS are similar, meaning they use semaphores, create tasks/threads, 
using queue’s etc…

If you are looking for a job, use the time in between to learn new skills. 
Learn some JS, XML,
JSON, HTML etc…


Good luck,
Noam.
From: lwip-users [mailto:lwip-users-bounces+noam=silrd....@nongnu.org] On 
Behalf Of Jin Won Seo
Sent: Thursday, June 23, 2016 5:42 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LwIP multithread select mode problems

Sorry for irrelevant reply, but I am so frustrated to find a job.
I used Lwip 1.4.1 in my project + RTOS, but ... almost nothing I can find.
Is this industry dead? These skill sets are not useful?


On Thu, Jun 23, 2016 at 7:33 AM, Joel Cunningham 
<joel.cunning...@me.com<mailto:joel.cunning...@me.com>> wrote:
Hi,

select() can be used by multiple threads at the same time and you can even have 
the same sockets in multiple calls and it will be safe.  The limitation comes 
from trying to use the same sockets from multiple simultaneous threads in other 
socket APIs (select is the exception, simultaneous send, recv, or close on the 
same socket is not supported, especially in 1.4.1).

In regards to the maxfd question, I think there is a small misunderstanding.  
The maxfd parameter in select() is the largest FD in your input FD_SETs + 1.  
This is because maxfd is used to iterate through the FD_SETs provided.  It has 
nothing to do with other threads calling select() or how many sockets are in 
the system, but the maximum value of any FDs in the current select() call.

Joel

On Jun 23, 2016, at 03:59 AM, lampo <lbg...@163.com<mailto:lbg...@163.com>> 
wrote:
hello,
can someone help me with multithread problem ?

we use lwip 1.4.1 in PLC products, and if it live through long time(1 month
for example) testing in industry use,
I will back here to report.

*our problem*
we use multithread select mode in our system, and it "seems" it's ok till
now(1 days passed),
but I see the doc in rawapi.txt,"/Netconn or Socket Api are not reentrant at
the control bolck granularity level/" .
so I really cannot figure out if im doing right thing.

*our application background/restriction*

a, our system is RTOS based , we need 2 TCP clients(separately connecting to
2 TCP servers, i.e., 2 lasers),
1 TCP server(deal with max of 4 remote clients,i.e.,4 modbus clients ), and
1 web server.

b, lwip related thread cannot be in polling mode, for here is already a
polling thread in RTOS and it has "soft real time" requirements.

c, current lwip version is 1.4.1(we are evaluating 2.0.0)

d, we need to send data to tcp servers periodically, 10 ms

*our design/implementation *

3 thread has used 'select' , but the same socket is only closed by the
thread who created it. here is details,

we use 'select' in "user tcp client send thread" ,we first call
'connect',and then call 'select' to determine whether the socket is
connected correctly or not; if some errors detected in connecting or data
sending, we call 'close' to close the socket.
we use 'select' in "user tcp client receive thread", blocked forever
waiting for data, and call 'recvfrom' if data received, if some errors
detected
in this thread,we don't just clost the socket ,but send message to "user tcp
client send thread" and tell it to close.
we use 'select' in "user tcp server thread",listening for incoming requests,
receiving and responding(sending) data.

*our doubt*
1、 ‘select’ can be used in multithread or not? if yes, the first param
maxfdp1 of lwip_select() must be set to the total number of sockets in each
thread?
for example,in our situation, maxfdp1 = 2(clients) + 4(remote clients) +
1(listen socket) in each select?

2、is SYS_ARCH_PROTECT must be used in multithread?

3、if lwip 1.4.1 does not support the multithread select mode, does lwip
2.0.0 supports it?

Thanks a lot !



--
View this message in context: 
http://lwip.100.n7.nabble.com/LwIP-multithread-select-mode-problems-tp26561.html
Sent from the lwip-users mailing list archive at Nabble.com<http://Nabble.com>.

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org<mailto:lwip-users@nongnu.org>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org<mailto:lwip-users@nongnu.org>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to