nuttx/include
Masayuki Ishikawa d295f11a3a SMP: Introduce a new global IRQ clearing logic and tasklist protection.
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>
2018-01-31 15:35:36 +09:00
..
arpa
cxx More fixes for compilation with current SDCC compiler 2017-09-30 15:28:04 -06:00
net Squashed commit of the following: 2017-09-19 14:17:05 -06:00
netinet include/netinet/tcp.h: Add trivial standard tcp.h header file. 2017-11-12 13:22:14 -06:00
netpacket Squashed commit of the following: 2017-08-19 08:48:52 -06:00
nuttx SMP: Introduce a new global IRQ clearing logic and tasklist protection. 2018-01-31 15:35:36 +09:00
sys This commit eliminates the BOARDIOC_TSCTEST_SETUP command. 2018-01-17 09:33:28 -06:00
.gitignore
aio.h
assert.h
crc8.h
crc16.h
crc32.h
crc64.h More fixes for compilation with current SDCC compiler 2017-09-30 15:28:04 -06:00
ctype.h
debug.h Add power-related debug output 2017-07-23 07:17:56 -06:00
dirent.h
dllfcn.h
elf32.h
errno.h
fcntl.h
fixedmath.h
hex2bin.h
inttypes.h
libgen.h
limits.h libc: Add support for readv() and write(). Also includes some cosmetic changes to some unrelated files. 2017-11-11 11:44:14 -06:00
locale.h
mqueue.h
netdb.h
nxflat.h
poll.h
pthread.h
queue.h
sched.h
semaphore.h sem_open() should return SEM_FAILED on any failures. This is change change in the POSIX specification since the original sem_open() was written so many years ago. 2017-09-08 10:14:51 -06:00
signal.h libc/signal: Add support for sigwait(). 2017-11-11 12:37:47 -06:00
spawn.h
stdbool.h
stddef.h
stdint.h
stdio.h
stdlib.h
stdnoreturn.h stdnoreturn.h: remove C++11 dependency. Applies to C too. 2017-10-02 07:38:43 -06:00
string.h
strings.h
syscall.h
syslog.h Merged in antmerlino/nuttx/logupto-fix (pull request #559) 2017-12-20 13:34:29 +00:00
termios.h include/termios.h: Update comments; fix long lines. 2018-01-18 12:51:07 -06:00
threads.h
time.h sched/signal/sig_nanosleep.c and libc/time/lib_nanosleep.c: Implement clock_nanosleep(). nanosleep() is now reduced to a libc wrapper around clock_nanosleep(). 2017-11-11 17:44:59 -06:00
unistd.h Squashed commit of the following: 2018-01-03 16:03:56 -06:00
wchar.h More fixes for compilation with current SDCC compiler 2017-09-30 15:28:04 -06:00
wctype.h