Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pick the first pending entry and run it

Proto:static void async_run_entry_fn(struct work_struct *work)

Type:void

Parameter:

TypeParameterName
struct work_struct *work
111  entry = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(work, structasync_entry, work)
114  calltime = calltime
117  If initcall_debug && Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. < SYSTEM_RUNNING Then
118  pr_debug("calling %lli_%pS @ %i\n", (longlong)cookie, func, task_pid_nr(current process))
121  calltime = ktime_get()
123  func(data, cookie)
124  If initcall_debug && Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. < SYSTEM_RUNNING Then
125  rettime = ktime_get()
126  delta = Subtract two ktime_t variables. rem = lhs -rhs: (rettime, calltime)
127  pr_debug("initcall %lli_%pS returned 0 after %lld usecs\n", (longlong)cookie, func, (longlong)Convert ktime_t to nanoseconds >> 10)
134  spin_lock_irqsave( & async_lock, flags)
135  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
136  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
139  free previously allocated memory
140  atomic_dec( & entry_count)
142  spin_unlock_irqrestore( & async_lock, flags)
145  wake_up( & async_done)