Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid_namespace.c Create Date:2022-07-28 11:20:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:reboot_pid_ns

Proto:int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd)

Type:int

Parameter:

TypeParameterName
struct pid_namespace *pid_ns
intcmd
308  If 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. Then Return 0
312  Case cmd == LINUX_REBOOT_CMD_RESTART2
313  Case 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  Break
317  Case cmd == LINUX_REBOOT_CMD_POWER_OFF
318  Case cmd == LINUX_REBOOT_CMD_HALT
319  group exit code if this pidns was rebooted = SIGINT
320  Break
321  Default
322  Return -EINVAL
325  read_lock( & tasklist_lock)
326  send_sig(SIGKILL, child_reaper, 1)
327  read_unlock( & tasklist_lock)
329  do_exit(0)
332  Return 0
Caller
NameDescribe
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.