函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed

函数原型:signed long __sched schedule_timeout(signed long timeout)

返回类型:signed long

参数:

类型参数名称
signed longtimeout
1863  :timeout恒等于MAX_SCHEDULE_TIMEOUT
1871  进程调度
1872  转到:out
1873  默认
1881  如果timeout小于0则
1884  dump_stack()
1885  state等于就绪态
1886  转到:out
1890  expire等于timeoutjiffies
1892  task等于当前进程
1893  timer_setup_on_stack( & timer, process_timeout, 0)
1894  __mod_timer( & timer, expire, 0)
1895  进程调度
1896  del_singleshot_timer_sync( & timer)
1899  destroy_timer_on_stack( & timer)
1901  timeout等于expirejiffies
1903  out :
1904  返回:如果timeout小于0则0否则timeout
调用者
名称描述
io_schedule_timeoutThis task is about to go to sleep on IO. Increment rq->nr_iowait so* that process accounting knows that this is a task in IO wait state.
wait_wokenDEFINE_WAIT_FUNC(wait, woken_wake_func);* add_wait_queue(&wq_head, &wait);* for (;;) {* if (condition)* break;* // in wait_woken() // in woken_wake_function()* p->state = mode; wq_entry->flags |= WQ_FLAG_WOKEN;* smp_mb(); // A try_to_wake_up():* if
bit_wait_timeout
__down_commonBecause this function is inlined, the 'state' parameter will be* constant, and thus optimised away by the compiler. Likewise the* 'timeout' parameter for the cases without timeouts.
schedule_timeout_interruptibleWe can use __set_current_state() here because schedule_timeout() calls* schedule() unconditionally.
schedule_timeout_killable
schedule_timeout_uninterruptible
schedule_timeout_idleLike schedule_timeout_uninterruptible(), except this task will not contribute* to load average.
audit_log_start申请审计缓冲区
ring_buffer_producer_thread
io_wq_managerManager thread. Tasked with creating new workers, if we need them.
apm_mainloopThis is the APM thread main loop.
usermodehelper_read_lock_wait
kswapd_try_to_sleep
do_semtimedop
io_wqe_worker