函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\rcutorture.c Create Date:2022-07-27 11:22:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Return a random protection state mask, but with at least one bit set.

函数原型:static int rcutorture_extend_mask(int oldmask, struct torture_random_state *trsp)

返回类型:int

参数:

类型参数名称
intoldmask
struct torture_random_state *trsp
1213  mask等于Return the biggest extendables mask given current RCU and boot parameters.
1214  randmask1等于torture_random(trsp)右移8位
1215  randmask2等于randmask1右移3位
1217  WARN_ON_ONCE(mask >> Put SRCU index in upper bits. )
1219  如果非randmask1按位与0x7的值则mask等于mask按位与randmask2
1221  否则mask等于mask按位与1左移randmask2取模Number of bits defined above.
1224  如果mask按位与... disabling interrupts. 且非mask按位与Extend readers by disabling bh. 的值且oldmask按位与Extend readers by disabling bh. 或非mask按位与... rcu_read_lock_bh(). 的值且oldmask按位与... rcu_read_lock_bh(). 的值则mask或等于Extend readers by disabling bh. 按位或... rcu_read_lock_bh().
1228  返回:如果mask否则... entering another RCU reader.
调用者
名称描述
rcutorture_loop_extendDo a randomly selected number of extensions of an existing RCU read-side* critical section.
rcu_torture_one_readDo one read-side critical section, returning false if there was* no data to read. Can be invoked both from process context and* from a timer handler.