Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:DEFINE_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

Proto:long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout)

Type:long

Parameter:

TypeParameterName
struct wait_queue_entry *wq_entry>flags &= ~WQ_FLAG_WOKEN; ~~~~~~~~~~~~~~~~~~
unsignedmode
longtimeout
431  set_current_state(mode)
432  If Not (flags & WQ_FLAG_WOKEN) && Not is_kthread_should_stop() Then timeout = schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed
434  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Used in tsk->state: )
442  smp_store_mb(flags, flags & ~WQ_FLAG_WOKEN)
444  Return timeout
Caller
NameDescribe
fanotify_read