Shell 944f3d05b5 feat: add system reboot and process teardown support
The patch introduces support for system reboot functionality and process teardown,
allowing for a clean shutdown and unmounting of the root filesystem. This is
necessary for ensuring a proper system shutdown process, especially when dealing
with resource cleanup and ensuring that all processes have exited before system
shutdown.

Changes:
- Added `lwp_teardown()` function to handle process cleanup and system teardown.
- Introduced `lwp_pid_wait_for_empty()` to wait for process ID table emptiness
  before proceeding with shutdown.
- Updated `dfs_mnt_unref()` to trigger callbacks when unmounting a filesystem.
- Added new reboot types (`RB_AUTOBOOT`, `RB_POWER_OFF`) and implemented their
  corresponding actions, including cleanup of processes and unmounting root
  filesystem.
- Extended `sys_reboot()` to handle reboot and power off types with appropriate
  callbacks for process and filesystem teardown.
- Introduced callback mechanism for root filesystem unmount notifications.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
..
2024-12-20 17:50:00 -05:00
2024-03-28 23:42:56 +08:00
2022-12-03 12:07:44 +08:00
2022-12-03 12:07:44 +08:00
2022-12-03 12:07:44 +08:00
2024-03-28 23:42:56 +08:00
2024-02-23 17:49:15 +08:00
2023-11-10 21:37:07 +08:00
2024-02-23 17:49:15 +08:00
2024-03-28 23:42:56 +08:00
2022-12-03 12:07:44 +08:00
2022-12-03 12:07:44 +08:00
2024-03-28 23:42:56 +08:00
2023-10-17 13:07:59 +08:00
2022-12-03 12:07:44 +08:00