incubator-nuttx/net
Masayuki Ishikawa 1d958980bd Merged in masayuki2009/nuttx.nuttx/fix_smp_bugs (pull request #615)
Fix SMP related bugs

* sched/sched: Fix a deadlock in SMP mode

    Two months ago, I introduced sched_tasklist_lock() and
    sched_tasklist_unlock() to protect tasklists in SMP mode.
    Actually, this change works pretty well for HTTP audio
    streaming aging test with lc823450-xgevk.

    However, I found a deadlock in the scheduler when I tried
    similar aging tests with DVFS autonomous mode where CPU
    clock speed changed based on cpu load. In this case, call
    sequences were as follows;

    cpu1: sched_unlock()->sched_mergepending()->sched_addreadytorun()->up_cpu_pause()
    cpu0: sched_lock()->sched_mergepending()

    To avoid this deadlock, I added sched_tasklist_unlock() when calling
    up_cpu_pause() and sched_addreadytorun(). Also, added
    sched_tasklist_lock() after the call.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* libc: Add critical section in lib_filesem.c for SMP

    To set my_pid into fs_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* mm: Add critical section in mm_sem.c for SMP

    To set my_pid into mm_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* net: Add critical section in net_lock.c for SMP

    To set my pid (me) into fs_folder atomically in SMP mode,
    critical section API must be used.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-20 12:34:38 +00:00
..
arp Standardization of some function headers. 2018-03-13 09:52:27 -06:00
devif Standardization of some function headers. 2018-03-13 09:52:27 -06:00
icmp Standardization of some function headers. 2018-03-13 09:52:27 -06:00
icmpv6 Standardization of some function headers. 2018-03-13 09:52:27 -06:00
ieee802154 Standardization of some function headers. 2018-03-13 09:52:27 -06:00
igmp Standardization of some function headers. 2018-03-13 09:52:27 -06:00
inet Standardization of some function headers. 2018-03-13 09:52:27 -06:00
ipforward Standardization of some function headers. 2018-03-13 09:52:27 -06:00
local Standardization of some function headers. 2018-03-13 09:52:27 -06:00
loopback Fix IPv6 loopback driver that depended on the removed g_ipv6_allonesaddr. Noted by Masayuki Ishikawa 2017-08-09 06:59:55 -06:00
neighbor Standardization of some function headers. 2018-03-13 09:52:27 -06:00
netdev Standardization of some function headers. 2018-03-13 09:52:27 -06:00
pkt Standardization of some function headers. 2018-03-13 09:52:27 -06:00
procfs Trivial fix in some comments. 2017-09-20 10:06:26 -06:00
route Standardization of some function headers. 2018-03-13 09:52:27 -06:00
sixlowpan Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
socket Standardization of some function headers. 2018-03-13 09:52:27 -06:00
tcp Standardization of some function headers. 2018-03-13 09:52:27 -06:00
udp Standardization of some function headers. 2018-03-13 09:52:27 -06:00
usrsock Standardization of some function headers. 2018-03-13 09:52:27 -06:00
utils Merged in masayuki2009/nuttx.nuttx/fix_smp_bugs (pull request #615) 2018-03-20 12:34:38 +00:00
.gitignore
Kconfig This commit adds an as-of-yet untested implemented of UDP write buffering. 2018-01-22 18:32:02 -06:00
Makefile Squashed commit of the following: 2017-08-19 08:48:52 -06:00
README.txt Squashed commit of the following: 2017-08-19 08:48:52 -06:00
net_initialize.c This commit adds an as-of-yet untested implemented of UDP write buffering. 2018-01-22 18:32:02 -06:00

README.txt

README
======

Directory Structure
===================

  nuttx/
   |
   `- net/
       |
       +- arp        - Address resolution protocol (IPv4)
       +- devif      - Stack/device interface layer
       +- icmp       - Internet Control Message Protocol (IPv4)
       +- icmpv6     - Internet Control Message Protocol (IPv6)
       +- ieee802154 - PF_IEEE802154 socket interface
       +- inet       - PF_INET/PF_INET6 socket interface
       +- ipforward  - IP forwarding logic
       +- local      - Unix domain (local) sockets
       +- loopback   - Local loopback
       +- neighbor   - Neighbor Discovery Protocol (IPv6)
       +- netdev     - Socket network device interface
       +- pkt        - "Raw" packet socket support
       +- sixlowpan  - 6LoWPAN implementation
       +- socket     - BSD socket interface
       +- route      - Routing table support
       +- tcp        - Transmission Control Protocol
       +- udp        - User Datagram Protocol
       +- usrsock    - User socket API for user-space networking stack
       `- utils      - Miscellaneous utility functions


    +-------------------------------------------------------------------++------------------------+
    |                     Application layer                             || usrsock daemon         |
    +-------------------------------------------------------------------++------------------------+
    +-------------------------------------------------------------------++----------------+ +-----+
    |                   Socket layer (socket/)                          || /dev/usrsock   | |     |
    +-------------------------------------------------------------------++----------------+ |     |
    +------------++--------------------------------------------------++-------------------+ |     |
    |  Network   || Protocol stacks (arp, ipv6, icmp, pkt, tcp, udp) || usrsock/          | |     |
    |   Device   |+--------------------------------------------------++-------------------+ |     |
    | Interface  |+------------------------------------++---------------------------------+ |     |
    | (netdev/)  ||  Network Device Interface (devif/) || Utilities                       | |     |
    +------------++------------------------------------++---------------------------------+ |     |
    +----------------------------------------------------------------+                      |     |
    |                    Network Device Drivers                      |                      | HAL |
    +----------------------------------------------------------------+                      +-----+
    +----------------------------------------------------------------+ +--------------------------+
    |                    Networking Hardware                         | |  Hardware TCP/IP Stack   |
    +----------------------------------------------------------------+ +--------------------------+