函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lockdep.c Create Date:2022-07-27 10:50:25
Last Modify:2020-03-17 14:16:01 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Remove the lock from the list of currently held locks - this gets* called on mutex_unlock()/spin_unlock*() (or on a failed* mutex_lock_interruptible()).

函数原型:static int __lock_release(struct lockdep_map *lock, unsigned long ip)

返回类型:int

参数:

类型参数名称
struct lockdep_map *lock
unsigned longip
4217  curr等于当前进程
4218  merged等于1
4222  如果此条件成立可能性小(为编译器优化)(!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)则返回:0
4225  depth等于lockdep_depth
4230  如果depth小于等于0则
4231  print_unlock_imbalance_bug(curr, lock, ip)
4232  返回:0
4239  hlock等于@depth must not be zero
4240  如果非hlock
4241  print_unlock_imbalance_bug(curr, lock, ip)
4242  返回:0
4245  如果instance恒等于locklock_release_holdtime(hlock)
4248  WARN(pin_count, "releasing a pinned lock\n")
4250  如果references
4251  references自减
4252  如果references
4258  返回:1
4268  lockdep_depth等于i
4269  curr_chain_key等于prev_chain_key
4275  如果i恒等于depth减1则返回:1
4278  如果reacquire_held_locks(curr, depth, i + 1, & merged)则返回:0
4286  DEBUG_LOCKS_WARN_ON(lockdep_depth != depth - merged)
4293  返回:0
调用者
名称描述
lock_release