This change introduces the `lwp_signal_kill_all` function, which allows a
signal to be sent to all processes in the system. The function iterates
over all PIDs and sends the specified signal to each process, except those
that are protected from signals. This enhancement provides a convenient way
to broadcast signals across all processes in the system.
Changes:
- Added `lwp_signal_kill_all` function in `lwp_signal.c` to broadcast a
signal to all processes by iterating over all PIDs using the existing
`lwp_pid_for_each` function.
- Introduced a new `kill_all_param` structure to encapsulate the signal
information needed for killing processes.
- Added internal `_kill_each` helper function for sending the signal to each
PID.
- Updated `lwp_signal.h` with the new function prototype for `lwp_signal_kill_all`.
- Modified `sys_kill` in `lwp_syscall.c` to call `lwp_signal_kill_all` when
a process is not specified.
Signed-off-by: Shell <smokewood@qq.com>
This change introduces the `lwp_pid_for_each` function, which provides a
convenient and thread-safe method for iterating over PIDs with a user-
defined callback. This addition is necessary to support cases where
operations must be performed on each PID in the balanced tree, enhancing
flexibility and modularity for PID management.
Changes:
- Added `lwp_pid_for_each` function in `lwp_pid.c` to allow iteration
over PIDs using a callback function and optional data parameter.
- Defined a new internal `pid_foreach_param` structure to encapsulate
the callback and data for the iteration.
- Added `_before_cb` helper function for executing the callback on each
PID node during AVL traversal.
- Ensured thread safety by acquiring and releasing the PID lock around
the AVL traversal within `lwp_pid_for_each`.
- Updated `lwp_pid.h` with the `lwp_pid_for_each` function prototype and
included `rtthread.h` for necessary types.
Signed-off-by: Shell <smokewood@qq.com>
Add logging as Env['log']:
- the default level is INFO;
- when using `scons --verbose`, the level will be
change to debug level.
- Add more debug information for cc detection.
duo is a real hardware, no need for virtio.
Disable RT_USING_VIRTIO and update configuration to latest.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Move the combine.sh to under cv18xx_aarch64, so we can
run this script the same as scons and no need to change
cwd.
Rename the folder boot to prebuild just becuase all the
files under boot are prebuild binaries.
Move the prebuilt fip.bin to under prebuild/milkv-duo256m
because it's only for 256.
Update combine.sh accordingly and output fip.bin to the output
folder where we create fip.bin/boot.sd as other bsp.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
For ARM, RT-smart and RT-standard both enable mmc (see
rt_hw_board_init() in bsp/cvitek/cv18xx_aarch64/board/board.c,
rt_hw_mmu_setup is called both for smart or standard).
So ioremap is must to do for ARM.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
smp_call.h defines SMP-related structures and declares
SMP-related functions. These codes are only valid when
RT_USING_SMP is defined in the bsp, which means we have
to use RT_USING_SMP for judgment in every place where
this file is included, such as following:
```c
```
Now move the judgment of RT_USING_SMP directly into
smp_call.h, so that it's simpler to include the header
file as:
```c
```
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
There is problem in the Kconfig of qemu-virt64-riscv.
RT_USING_VIRTIO is already defined in components/drivers/virtio/Kconfig,
so it should not be defined again in the BSP kconfig.
The solution is to rename RT_USING_VIRTIO to BSP_USING_VIRTIO.
Also, refer to the configuration method for virtio device drivers in
bsp/qemu-virt64-aarch64/drivers/Kconfig to rewrite the configuration
of BSP_USING_VIRTIO_xxx.
Updated default .config/rtconfig.h at the same time.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>