Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:klist_remove - Decrement the refcount of node and wait for it to go away.*@n: node we're removing.

Proto:void klist_remove(struct klist_node *n)

Type:void

Parameter:

TypeParameterName
struct klist_node *n
242  node = n
243  process = current process
244  woken = 0
245  spin_lock( & klist_remove_lock)
246  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
247  spin_unlock( & klist_remove_lock)
249  klist_del - Decrement the reference count of node and try to remove.*@n: node we're deleting.
251  cycle
252  set_current_state(TASK_UNINTERRUPTIBLE)
253  If woken Then Break
255  schedule()
257  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: )