Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\rcutorture.c Create Date:2022-07-28 10:21:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Return a random protection state mask, but with at least one bit set.

Proto:static int rcutorture_extend_mask(int oldmask, struct torture_random_state *trsp)

Type:int

Parameter:

TypeParameterName
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  If Not (randmask1 & 0x7) Then mask = mask & randmask2
1221  Else mask = mask & 1 << randmask2 % Number of bits defined above.
1224  If mask & ... disabling interrupts. && ( Not (mask & Extend readers by disabling bh. ) && oldmask & Extend readers by disabling bh. || Not (mask & ... rcu_read_lock_bh(). ) && oldmask & ... rcu_read_lock_bh(). ) Then mask |= Extend readers by disabling bh. | ... rcu_read_lock_bh().
1228  Return If mask Else ... entering another RCU reader.
Caller
NameDescribe
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.