Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lockdep.c Create Date:2022-07-28 09:50:05
Last Modify:2020-03-17 14:16:01 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__lock_downgrade

Proto:static int __lock_downgrade(struct lockdep_map *lock, unsigned long ip)

Type:int

Parameter:

TypeParameterName
struct lockdep_map *lock
unsigned longip
4163  curr = current process
4164  merged = 0
4168  If Value for the false possibility is greater at compile time(!We want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and) Then Return 0
4171  depth = lockdep_depth
4176  If DEBUG_LOCKS_WARN_ON(!depth) Then Return 0
4179  hlock = @depth must not be zero
4180  If Not hlock Then
4181  print_unlock_imbalance_bug(curr, lock, ip)
4182  Return 0
4185  lockdep_depth = i
4186  curr_chain_key = prev_chain_key
4188  WARN(read, "downgrading a read lock")
4189  read = 1
4190  acquire_ip = ip
4192  If reacquire_held_locks(curr, depth, i, & merged) Then Return 0
4196  If DEBUG_LOCKS_WARN_ON(merged) Then Return 0
4203  If DEBUG_LOCKS_WARN_ON(lockdep_depth != depth) Then Return 0
4206  Return 1
Caller
NameDescribe
lock_downgrade