Function Report

Linux Kernel (v4.4)

Source File:kernel\kthread.c Create Date:2016-01-14 10:37:27
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:kthread_stop

Function:int kthread_stop(struct task_struct *k)

Return Type:int

Parameter:

Type Parameter NameRemarks
struct task_struct * kinformation of task

Function description:stop a thread

481  kthread * kthread
484  trace_sched_kthread_stop(information of task)
486  get_task_struct
487  kthread = to_live_kthread(information of task)
488  If kthread then
489  Atomically set a bit in memory
490  __kthread_unpark(information of task, kthread)
491  Wake up a specific process
492  waits for completion of a task
494  ret = exit code
495  put_task_struct(information of task)
497  trace_sched_kthread_stop_ret(ret)
498  Returning ret
Caller
Function NameFunction description
test_rht_init
apm_exit
destroy_workqueue safely terminate a workqueue
smpboot_destroy_threads
save_image_lzo Save the suspend image data compressed with LZO.
load_image_lzo Load compressed image data and decompress them with LZO.
__setup_irqregister an interrupt
__free_irqInternal function to unregister an irqaction- used to free regular and special interrupts that are part of the architecture.
ring_buffer_benchmark_init
ring_buffer_benchmark_exit
trace_benchmark_unregWhen the benchmark tracepoint is disabled, it calls this function and the thread that calls the tracepoint is deleted and all the numbers are reset.
torture_shuffle_cleanup* Stop the shuffling.
torture_shutdown_cleanupShut down the shutdown task. Say what??? Heh! This can happen if the torture module gets an rmmod before the shutdown time arrives.;-)
torture_stutter_cleanupCleanup after the torture_stutter kthread.
_torture_stop_kthreadStop a generic kthread, emitting a message.
kswapd_stopCalled by memory hotplug when all memory in a node is offlined. Caller must hold mem_hotplug_begin/end().
ksm_init
start_stop_khugepaged
stop_scan_threadStop the automatic memory scanning thread. This function must be called with the scan_mutex held.