mirror of
https://github.com/apache/nuttx.git
synced 2026-10-17 11:08:57 +00:00
The previous implementation of clearing global IRQ in sched_addreadytorun() and sched_removereadytorun() was done too early. As a result, nxsem_post() would have a chance to enter the critical section even nxsem_wait() is still not in blocked state. This patch moves clearing global IRQ controls from sched_addreadytorun() and sched_removereadytorun() to sched_resumescheduler() to ensure that nxsem_post() can enter the critical section correctly. For this change, sched_resumescheduler.c is always necessary for SMP configuration. In addition, by this change, task_exit() had to be modified so that it calls sched_resumescheduler() because it calls sched_removescheduler() inside the function, otherwise it will cause a deadlock. However, I encountered another DEBUGASSERT() in sched_cpu_select() during HTTP streaming aging test on lc823450-xgevk. Actually sched_cpu_select() accesses the g_assignedtasks which might be changed by another CPU. Similarly, other tasklists might be modified simultaneously if both CPUs are executing scheduling logic. To avoid this, I introduced tasklist protetion APIs. With these changes, SMP kernel stability has been much improved. Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> |
||
|---|---|---|
| .. | ||
| arpa | ||
| cxx | ||
| net | ||
| netinet | ||
| netpacket | ||
| nuttx | ||
| sys | ||
| .gitignore | ||
| aio.h | ||
| assert.h | ||
| crc8.h | ||
| crc16.h | ||
| crc32.h | ||
| crc64.h | ||
| ctype.h | ||
| debug.h | ||
| dirent.h | ||
| dllfcn.h | ||
| elf32.h | ||
| errno.h | ||
| fcntl.h | ||
| fixedmath.h | ||
| hex2bin.h | ||
| inttypes.h | ||
| libgen.h | ||
| limits.h | ||
| locale.h | ||
| mqueue.h | ||
| netdb.h | ||
| nxflat.h | ||
| poll.h | ||
| pthread.h | ||
| queue.h | ||
| sched.h | ||
| semaphore.h | ||
| signal.h | ||
| spawn.h | ||
| stdbool.h | ||
| stddef.h | ||
| stdint.h | ||
| stdio.h | ||
| stdlib.h | ||
| stdnoreturn.h | ||
| string.h | ||
| strings.h | ||
| syscall.h | ||
| syslog.h | ||
| termios.h | ||
| threads.h | ||
| time.h | ||
| unistd.h | ||
| wchar.h | ||
| wctype.h | ||