函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Do one extension of an RCU read-side critical section using the* current reader state in readstate (set to zero for initial entry* to extended critical section), set the new state as specified by* newstate (set to zero for final exit from extended

函数原型:static void rcutorture_one_extend(int *readstate, int newstate, struct torture_random_state *trsp, struct rt_read_seg *rtrsp)

返回类型:void

参数:

类型参数名称
int *readstate
intnewstate
struct torture_random_state *trsp
struct rt_read_seg *rtrsp
1147  idxnew等于负1
1148  idxold等于readstate
1149  statesnew等于readstate的反按位与newstate
1150  statesold等于readstate按位与newstate的反
1152  WARN_ON_ONCE(idxold < 0)
1153  WARN_ON_ONCE((idxold >> Put SRCU index in upper bits. ) > 1)
1154  rt_readstate等于newstate
1157  如果statesnew按位与Extend readers by disabling bh. local_bh_disable()
1159  如果statesnew按位与... disabling interrupts. 禁止中断()
1161  如果statesnew按位与... disabling preemption. 禁止抢占()
1163  如果statesnew按位与... rcu_read_lock_bh(). _read_lock_bh() - mark the beginning of an RCU-bh critical section* This is equivalent of rcu_read_lock(), but also disables softirqs
1165  如果statesnew按位与... rcu_read_lock_sched(). _read_lock_sched() - mark the beginning of a RCU-sched critical section* This is equivalent of rcu_read_lock(), but disables preemption.* Read-side critical sections can also be introduced by anything else
1167  如果statesnew按位与... entering another RCU reader. idxnew等于readlock()左移Put SRCU index in upper bits.
1171  如果statesold按位与... disabling interrupts. 开中断()
1173  如果statesold按位与Extend readers by disabling bh. local_bh_enable()
1175  如果statesold按位与... disabling preemption. 禁用抢占和中断()
1177  如果statesold按位与... rcu_read_lock_bh(). 标记rcu锁结束的软中断
1179  如果statesold按位与... rcu_read_lock_sched(). 标记rcu锁结束
1181  如果statesold按位与... entering another RCU reader. readunlock(idxold >> Put SRCU index in upper bits. )
1185  如果statesnewstatesold的值且readstatenewstateread_delay(trsp, rtrsp)
1189  如果idxnew恒等于负1则idxnew等于idxold按位与RCUTORTURE_RDR_MASK的反
1191  WARN_ON_ONCE(idxnew < 0)
1192  WARN_ON_ONCE((idxnew >> Put SRCU index in upper bits. ) > 1)
1193  readstate等于idxnew按位或newstate
1194  WARN_ON_ONCE(( * readstate >> Put SRCU index in upper bits. ) < 0)
1195  WARN_ON_ONCE(( * readstate >> Put SRCU index in upper bits. ) > 1)
调用者
名称描述
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.