Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cf39c5

Browse files
committed
feat(lwip): Delete socket_mt and update lwip sys_arch from idf
Commit ID: 463a9d8b
1 parent 2d11c90 commit 9cf39c5

File tree

7 files changed

+238
-1139
lines changed

7 files changed

+238
-1139
lines changed

components/lwip/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ set(include_dirs
99

1010
set(srcs
1111
"apps/dhcpserver/dhcpserver.c"
12-
"apps/multi-threads/sockets_mt.c"
1312
"apps/ping/esp_ping.c"
1413
"apps/ping/ping.c"
1514
"apps/ping/ping_sock.c"
@@ -136,10 +135,6 @@ if(CONFIG_ETH_ENABLED)
136135
list(APPEND srcs "port/esp32/netif/ethernetif.c")
137136
endif()
138137

139-
if(CONFIG_LWIP_SOCKET_MULTITHREAD)
140-
set(COMPONENT_OBJEXCLUDE lwip/src/api/sockets.c)
141-
endif()
142-
143138
idf_component_register(SRCS "${srcs}"
144139
INCLUDE_DIRS "${include_dirs}"
145140
LDFRAGMENTS linker.lf
@@ -161,3 +156,11 @@ if(GCC_NOT_5_2_0)
161156
-Wno-implicit-fallthrough
162157
)
163158
endif()
159+
160+
# "comparison is always false due to limited range of data type" warning
161+
# when setting CONFIG_LWIP_TCP_WND_DEFAULT to 65535
162+
set_source_files_properties(
163+
lwip/src/core/tcp.c
164+
PROPERTIES COMPILE_FLAGS
165+
-Wno-type-limits
166+
)

components/lwip/Kconfig

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,6 @@ menu "LWIP"
124124
help
125125
Enabling this option allows LWIP statistics
126126

127-
config LWIP_SOCKET_MULTITHREAD
128-
bool "LWIP socket supports multithread"
129-
default y
130-
help
131-
Enable the option can enable LWIP socket multithread and all
132-
function will be thread safe.
133-
134-
config SET_SOLINGER_DEFAULT
135-
bool "set socket SO_LINGER default"
136-
default y
137-
depends on LWIP_SOCKET_MULTITHREAD
138-
help
139-
The function is only used by socket multi-thread.
140-
141-
Enable this option can set the target socket to enable the "SO_LINGER" and config timeout to be "0" when it is created.
142-
It means that if close the socket, all send queue will be dropped, so heap memory can be collected immediately,
143-
but some packets which are waiting to be sent will lost.
144-
145127
config LWIP_ETHARP_TRUST_IP_MAC
146128
bool "Enable LWIP ARP trust"
147129
default n

0 commit comments

Comments
 (0)