incubator-nuttx/net/utils
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
..
CMakeLists.txt
Kconfig
Make.defs
net_chksum.c
net_cmsg.c
net_dsec2tick.c
net_dsec2timeval.c
net_getrandom.c
net_icmpchksum.c
net_incr32.c
net_iob_concat.c
net_ipchksum.c
net_ipv6_maskcmp.c
net_ipv6_payload.c
net_ipv6_pref2mask.c
net_lock.c
net_mask2pref.c
net_snoop.c sched: add up_this_task and up_change_task macro stub 2024-10-15 15:25:55 +08:00
net_tcpchksum.c
net_timeval2dsec.c
net_udpchksum.c
utils.h