Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__percpu_down_read

Proto:int __percpu_down_read(struct percpu_rw_semaphore *sem, int try)

Type:int

Parameter:

TypeParameterName
struct percpu_rw_semaphore *sem
inttry
61  smp_mb()
67  If Value is more likely to compile time(!smp_load_acquire( & readers_block)) Then Return 1
74  __percpu_up_read(sem)
76  If try Then Return 0
83  preempt_enable_no_resched()
88  lock for reading
89  this_cpu_inc( * read_count)
90  lock after reading
92  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
93  Return 1