-
Notifications
You must be signed in to change notification settings - Fork 1.4k
net/usrsock: replace net_lock with usrsock_lock #17734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@zhhyu7 please fix this CI error: Error: /github/workspace/sources/nuttx/include/nuttx/net/usrsock.h:322:10: error: implicit declaration of function 'net_sem_timedwait2'; did you mean 'nxsem_timedwait'? [-Wimplicit-function-declaration] |
556fe8f to
0c30689
Compare
dup2 and setsockopt can use the lock in conn to protect resources, the lock in accept is originally used to protect the connection status. however, only the send, recv, netpoll, and connect processes will check this flag. only when the interface returns will the corresponding conn structure be exposed to the caller, and then the above operations can be performed. Therefore, this net_lock is not necessary. Signed-off-by: zhanghongyu <[email protected]>
…break two rmutexes can be passed in, and later the wait scenarios that require break the conn and netdev locks will be replaced. Signed-off-by: zhanghongyu <[email protected]>
remove the use of net_lock in the usrsock module and decouple it from other network modules. Signed-off-by: zhanghongyu <[email protected]>
Summary
remove the use of net_lock in the usrsock module and decouple it from other network modules.
Impact
net::usrsock
Testing
sim:rpserver and sim:rpproxy with ping and iperf
NuttX log: