Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:39:08
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:swevent_hlist_get_cpu

Proto:static int swevent_hlist_get_cpu(int cpu)

Type:int

Parameter:

TypeParameterName
intcpu
8786  swhash = per_cpu(swevent_htable, cpu)
8787  err = 0
8789  mutex_lock( & hlist_mutex)
8790  If Not Deref the hlist from the update side && pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then
8794  hlist = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
8795  If Not hlist Then
8796  err = -ENOMEM
8797  Go to exit
8799  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(swevent_hlist, hlist)
8801  hlist_refcount++
8802  exit :
8803  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
8805  Return err
Caller
NameDescribe
swevent_hlist_get