walnux/sched
Ville Juven c12aa5663d sched/affinity: Fix CPU_LOCKED functionality for some SMP calls
For some SMP calls it is necessary to lock the current CPU for the process
receiving the SMP call. This is done by setting the CPU affinity to the
current CPU and preventing the CPU selection algorithm from switching
CPUs.

  dtcb->flags |= TCB_FLAG_CPU_LOCKED;
  CPU_SET(dtcb->cpu, &dtcb->affinity);

However, this logic is currently broken, as CPU_SET is defined as:

  #define CPU_SET(c,s) do { *(s) |= (1u << (c)); } while (0)

In order to assign tcb->cpu (the current CPU) to the affinity mask, the
mask must be cleared first by calling CPU_ZERO.
2025-04-26 13:56:27 +08:00
..
addrenv sem_waitirq: Use kmap interface to access the semaphore 2024-12-18 08:57:01 +08:00
clock Revert "No need to call sched_lock explicitly after call spin_lock_irqsave, since it will be called in func spin_lock_irqsave." 2025-02-13 14:15:43 +08:00
environ sched/environ: There is no need to use sched_[un]lock 2024-10-11 02:43:11 +08:00
event sched/event: init deleted node to avoid null pointer reference 2024-12-26 23:28:37 +08:00
group group: use tg_mutex to replace tg_joinlock 2025-01-19 17:08:32 +08:00
init sched/init: Fix build error with CONFIG_BOARD_CRASHDUMP_CUSTOM 2025-03-08 00:18:25 +08:00
instrument gprof: move gprof function from sched to libbuiltin/libgcc 2024-11-13 02:42:31 +08:00
irq sched/spin_lock: rename raw_spin_lock to spin_lock_notrace 2025-02-13 20:48:15 +08:00
misc Revert "No need to call sched_lock explicitly after call spin_lock_irqsave, since it will be called in func spin_lock_irqsave." 2025-02-13 14:15:43 +08:00
module libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
mqueue sched/mqueue/CMakeLists.txt: fix compilation for CONFIG_DISABLE_MQUEUE_SYSV=n 2025-01-17 23:14:39 +08:00
paging Remove duplicate includes across multiple files 2025-01-09 23:30:23 +08:00
pthread sched/gettid: Move thread ID to TLS 2025-04-08 22:53:10 +08:00
sched sched/affinity: Fix CPU_LOCKED functionality for some SMP calls 2025-04-26 13:56:27 +08:00
semaphore libc/semaphore: Move fast mutex wait/post paths to libc 2025-04-01 20:37:23 +08:00
signal sched/affinity: Fix CPU_LOCKED functionality for some SMP calls 2025-04-26 13:56:27 +08:00
task sched/affinity: Fix CPU_LOCKED functionality for some SMP calls 2025-04-26 13:56:27 +08:00
timer sched/timer: remove critical section in setitimer 2025-01-19 17:08:32 +08:00
tls sched/gettid: Move thread ID to TLS 2025-04-08 22:53:10 +08:00
wdog sched/wdog: Fix int-to-pointer-cast and pointer-to-int-cast warnings. 2025-03-08 13:52:37 -03:00
wqueue sched/wqueue: Rename periodic workqueue API. 2025-03-08 13:52:37 -03:00
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Kconfig libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
Makefile Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00