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 net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
Kconfig
Make.defs net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_chksum.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_cmsg.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_dsec2tick.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_dsec2timeval.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_getrandom.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_icmpchksum.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_incr32.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_iob_concat.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_ipchksum.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_ipv6_maskcmp.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_ipv6_payload.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_ipv6_pref2mask.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_lock.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_mask2pref.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
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: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_timeval2dsec.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
net_udpchksum.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
utils.h net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00