1
0
Fork 0
forked from nuttx/nuttx-update
local-nuttx-update/net/usrsock
Xiang Xiao 90c52e6f8f Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>

    Run all .h and .c files modified in last PR through nxstyle.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Net cleanup (#17)

    * Fix the semaphore usage issue found in tcp/udp

    1. The count semaphore need disable priority inheritance
    2. Loop again if net_lockedwait return -EINTR
    3. Call nxsem_trywait to avoid the race condition
    4. Call nxsem_post instead of sem_post

    * Put the work notifier into free list to avoid the heap fragment in the long run.  Since the allocation strategy is encapsulated internally, we can even refine the implementation later.

    * Network stack shouldn't allocate memory in the poll implementation to avoid the heap fragment in the long run, other modification include:

    1. Select MM_IOB automatically since ICMP[v6] socket can't work without the read ahead buffer
    2. Remove the net lock since xxx_callback_free already do the same thing
    3. TCP/UDP poll should work even the read ahead buffer isn't enabled at all

    * Add NET_ prefix for UDP_NOTIFIER and TCP_NOTIFIER option to align with other UDP/TCP option convention

    * Remove the unused _SF_[IDLE|ACCEPT|SEND|RECV|MASK] flags since there are code to set/clear these flags, but nobody check them.
2019-12-31 09:26:14 -06:00
..
Kconfig Squashed commit of the following: 2019-12-31 09:26:14 -06:00
Make.defs net/usrsock: Add the listen/accept/getpeername/ioctl support 2018-08-26 15:15:48 -06:00
usrsock.h Squashed commit of the following: 2019-12-31 09:26:14 -06:00
usrsock_accept.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_bind.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_close.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_conn.c net/: Fix alignment and spacing problems found by tools/nxstyle. 2019-07-02 18:02:23 -06:00
usrsock_connect.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_dev.c Merged in masayuki2009/nuttx.nuttx/fix_usrsock (pull request #879) 2019-06-03 11:43:43 +00:00
usrsock_event.c net/usrsock: fix compiler warnings, mostly about nxsem_post 2017-10-25 07:31:14 -06:00
usrsock_getpeername.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_getsockname.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_getsockopt.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_ioctl.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_listen.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_poll.c Squashed commit of the following: 2019-12-31 09:26:14 -06:00
usrsock_recvfrom.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_sendto.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_setsockopt.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_socket.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
usrsock_sockif.c net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00