incubator-nuttx/mm/mm_heap
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
..
Make.defs
mm_addfreechunk.c
mm_brkaddr.c
mm_calloc.c
mm_extend.c
mm_free.c
mm_initialize.c Standardization of some function headers. 2018-03-13 09:52:27 -06:00
mm_mallinfo.c mm_mallinfo: do heap end debug assert check with heap semaphore held 2017-08-03 10:01:26 -06:00
mm_malloc.c mm: Fix a typo in a debug assertion. 2017-11-22 07:30:48 -06:00
mm_memalign.c mm/mm-heap: memalign: fix heap corruption caused by using unaligned chuck size. Unaligned nodes generated by memalign later cause heap corruptions when nodes are shrink further (for example, 24 bytes -> 8 bytes, when alignment is 16 bytes). 2017-10-24 15:35:52 -06:00
mm_realloc.c realloc(): When realloc() has to fall back to calling malloc(), size including overhead was being provided to malloc(), causing a slightly larger allocation than needed. Noted by initialkjc@yahoo.com 2017-03-28 07:23:46 -06:00
mm_sbrk.c mm/: Remove dangling space at the end of lines. 2017-06-28 13:31:21 -06:00
mm_sem.c Merged in masayuki2009/nuttx.nuttx/fix_smp_bugs (pull request #615) 2018-03-20 12:34:38 +00:00
mm_shrinkchunk.c mm/mm-heap: memalign: fix heap corruption caused by using unaligned chuck size. Unaligned nodes generated by memalign later cause heap corruptions when nodes are shrink further (for example, 24 bytes -> 8 bytes, when alignment is 16 bytes). 2017-10-24 15:35:52 -06:00
mm_size2ndx.c
mm_zalloc.c