nuttx-mirror/sched
hujun5 a567148888 sched: add up_this_task and up_change_task macro stub
reason:
We can utilize percpu storage to hold information about the
current running task. If we intend to implement this feature, we would
need to define two macros that help us manage this percpu information
effectively.

up_this_task: This macro is designed to read the contents of the percpu
              register to retrieve information about the current
              running task.This allows us to quickly access
              task-specific data without having to disable interrupts,
              access global variables and obtain the current cpu index.

up_update_task: This macro is responsible for updating the contents of
                the percpu register.It is typically called during
                initialization or when a context switch occurs to ensure
                that the percpu register reflects the information of the
                newly running task.

Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-15 15:25:55 +08:00
..
addrenv sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
clock cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
environ sched/environ: There is no need to use sched_[un]lock 2024-10-11 02:43:11 +08:00
event sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
group Revert "sched/group/setuptask_file: duplicate idle task fd for kernel thread" 2024-10-11 16:53:19 +08:00
init sched: add up_this_task and up_change_task macro stub 2024-10-15 15:25:55 +08:00
instrument sched/instrument: rename stack_record.c to stack_monitor.c 2024-10-13 02:10:41 +08:00
irq Revert "sched/spinlock: remove nesting spinlock support" 2024-10-14 17:42:16 +08:00
misc sched: modify CONFIG_DUMP_ON_EXIT to CONFIG_SCHED_DUMP_ON_EXIT 2024-10-15 01:50:55 +08:00
module modlib:Standardized module loading method 2024-10-05 15:22:02 +08:00
mqueue mq: change mqueue msg mail to dynamic array 2024-10-07 20:20:13 +08:00
paging sched: add nxsched_remove_self 2024-09-24 22:07:00 +08:00
pthread sched/pthread: Remove unused pthread_sem_xxx functions 2024-10-13 02:47:44 +08:00
sched sched: add up_this_task and up_change_task macro stub 2024-10-15 15:25:55 +08:00
semaphore cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
signal sched/signal: exit sig action when tcb group is null 2024-10-12 13:39:21 +08:00
task sched/task: There is no need to use sched_[un]lock 2024-10-11 02:43:11 +08:00
timer sched/signal: Fix compilation errors for MSVC. 2024-10-09 01:36:39 +08:00
tls sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
wdog sched/wdog: Fix code style 2024-10-10 13:57:46 +08:00
wqueue sched/wqueue: Fix unexpected dq entry status 2024-09-17 02:56:39 +08:00
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Kconfig coredump:Move coredump to sched/misc 2024-10-12 12:29:06 +08:00
Makefile Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00