Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\uprobes.c Create Date:2022-07-28 13:46:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:- search for a free slot.

Proto:static unsigned long xol_take_insn_slot(struct xol_area *area)

Type:unsigned long

Parameter:

TypeParameterName
struct xol_area *area
1590  Do
1591  slot_nr = find the first zero bit in a memory region(0 = free slot , UINSNS_PER_PAGE)
1592  If slot_nr < UINSNS_PER_PAGE Then
1597  Continue
1599  wait_event - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_UNINTERRUPTIBLE) until the*@condition evaluates to true( all slots are busy , (atomic_read( & umber of in-use slots ) < UINSNS_PER_PAGE))
1600  When slot_nr >= UINSNS_PER_PAGE cycle
1602  slot_addr = Page(s) of instruction slots + slot_nr * keep it cache aligned
1603  atomic_inc( & umber of in-use slots )
1605  Return slot_addr
Caller
NameDescribe
xol_get_insn_slotxol_get_insn_slot - allocate a slot for xol.* Returns the allocated slot address or 0.