函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid_namespace.c Create Date:2022-07-27 12:23:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:reboot_pid_ns

函数原型:int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd)

返回类型:int

参数:

类型参数名称
struct pid_namespace *pid_ns
intcmd
308  如果pid_ns恒等于PID-map pages start out as NULL, they get allocated upon* first use and are never deallocated. This way a low pid_max* value does not cause lots of bitmaps to be allocated, but* the scheme scales to up to 4 million PIDs, runtime.则返回:0
312  :cmd恒等于LINUX_REBOOT_CMD_RESTART2
313  :cmd恒等于Commands accepted by the _reboot() system call.* RESTART Restart system using default command and mode.* HALT Stop OS and give system control to ROM monitor, if any.* CAD_ON Ctrl-Alt-Del sequence causes RESTART command.
314  group exit code if this pidns was rebooted 等于SIGHUP
315  退出
317  :cmd恒等于LINUX_REBOOT_CMD_POWER_OFF
318  :cmd恒等于LINUX_REBOOT_CMD_HALT
319  group exit code if this pidns was rebooted 等于SIGINT
320  退出
321  默认
322  返回:负EINVAL
325  read_lock( & tasklist_lock)
326  send_sig(SIGKILL, 子进程回收器, 1)
327  read_unlock( & tasklist_lock)
329  do_exit(0)
332  返回:0
调用者
名称描述
SYSCALL_DEFINE4Reboot system call: for obvious reasons only root may call it,* and even root needs to set up some magic numbers in the registers* so that some mistake won't make this reboot the whole machine.* You can also set the meaning of the ctrl-alt-del-key here.