walnux/sched/mqueue
Jukka Laitinen 3e29996d97 sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task()
Change every occurence of up_switch_context to use this_task() as the first parameter.

"nxsched_add_readytorun" returns "true" if context switch is required. "nxsched_add_readytorun"
typically could only switch the assigned/running task to the one which is passed in as parameter.
But this is not strictly guaranteed in SMP; if other CPUs tweak with affinities or priorities,
it may be possible that the running task after the call is changed, but is some other
task from the readytorun list (and it should be, if there is higher priority one available or the
affinity of the added task prevents it to be scheduled in, but the previous head of the readytorun
list should run.

this_task() is always the correct one to switch to, since it always points to the tcb which was
just switched in by the nxsched_add_readytorun.

This is also a precursor to re-writing the SMP queue logic to remove pending lists for SMP.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-08-20 10:16:43 +08:00
..
CMakeLists.txt sched/mqueue/CMakeLists.txt: fix compilation for CONFIG_DISABLE_MQUEUE_SYSV=n 2025-01-17 23:14:39 +08:00
Make.defs mqueue: refactor of mqueue 2024-09-29 18:18:01 +08:00
mq_getattr.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
mq_initialize.c sched: unify Private Types banners 2025-05-28 10:17:15 +08:00
mq_msgfree.c sched: remove all spin_lock_irqsave(NULL) 2025-01-06 23:11:44 +08:00
mq_msgqalloc.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
mq_msgqfree.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
mq_notify.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
mq_rcvinternal.c sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00
mq_receive.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
mq_recover.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
mq_send.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
mq_setattr.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
mq_sndinternal.c sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00
mq_waitirq.c sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00
mqueue.h sched: remove all spin_lock_irqsave(NULL) 2025-01-06 23:11:44 +08:00
msg.h sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
msgctl.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
msgget.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
msginternal.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
msgrcv.c sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00
msgsnd.c sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00