Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Cause the torture test to shutdown the system after the test has* run for the time specified by the shutdown_secs parameter.

Proto:static int torture_shutdown(void *arg)

Type:int

Parameter:

TypeParameterName
void *arg
482  VERBOSE_TOROUT_STRING("torture_shutdown task started")
483  ktime_snap = ktime_get()
484  When ktime_before - Compare if a ktime_t value is smaller than another one.*@cmp1: comparable1*@cmp2: comparable2* Return: true if cmp1 happened before cmp2. && Not Is it time for the current torture test to stop? cycle
486  If verbose Then pr_alert("%s"TORTURE_FLAG"torture_shutdown task: %llu ms remaining\n", torture_type, ktime_ms_delta(ime to system shutdown. , ktime_snap))
491  set_current_state(TASK_INTERRUPTIBLE)
492  schedule_hrtimeout - sleep until timeout*@expires: timeout value (ktime_t)*@mode: timer mode* Make the current task sleep until the given expiry time has* elapsed. The routine will return immediately unless
493  ktime_snap = ktime_get()
495  If Is it time for the current torture test to stop? Then
496  Each kthread must wait for kthread_should_stop() before returning from* its top-level function, otherwise segfaults ensue
497  Return 0
502  VERBOSE_TOROUT_STRING("torture_shutdown task shutting down system")
503  Variables for auto-shutdown. This allows "lights out" torture runs* to be fully scripted. = NULL
504  If torture_shutdown_hook Then torture_shutdown_hook()
506  Else VERBOSE_TOROUT_STRING("No torture_shutdown_hook(), skipping.")
508  Dump the ftrace buffer, but only one time per callsite per boot.(DUMP_ALL)
509  kernel_power_off - power_off the system* Shutdown everything and perform a clean system power_off.
510  Return 0