Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\relay.c Create Date:2022-07-28 11:47:01
Last Modify:2020-03-17 19:20:22 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:relay_prepare_cpu

Proto:int relay_prepare_cpu(unsigned int cpu)

Type:int

Parameter:

TypeParameterName
unsigned intcpu
527  mutex_lock( & list of open channels, for cpu hotplug )
529  If buf = per_cpu_ptr( per-cpu channel buffers , cpu) Then Continue
531  buf = lay_open_buf - create a new relay channel buffer* used by relay_open() and CPU hotplug.
532  If Not buf Then
533  pr_err("relay: cpu %d buffer creation failed\n", cpu)
534  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.
535  Return -ENOMEM
537  per_cpu_ptr( per-cpu channel buffers , cpu) = buf
539  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.
540  Return 0