Function report |
Source Code:kernel\rcu\rcutorture.c |
Create Date:2022-07-28 10:21:48 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Do 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.
Proto:static bool rcu_torture_one_read(struct torture_random_state *trsp)
Type:bool
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct torture_random_state * | trsp |
| 1269 | readstate = 0 |
| 1270 | struct rt_read_seg rtseg[10] = {{0}} |
| 1277 | started = get_gp_seq() |
| 1278 | ts = rcu_trace_clock_local() |
| 1284 | If (p == NULL) Then |
| 1289 | If rtort_mbtest == 0 Then atomic_inc( & n_rcu_torture_mberror) |
| 1291 | rtrsp = Do a randomly selected number of extensions of an existing RCU read-side* critical section. |
| 1293 | pipe_count = rtort_pipe_count |
| 1294 | If pipe_count > RCU_TORTURE_PIPE_LEN Then |
| 1296 | pipe_count = RCU_TORTURE_PIPE_LEN |
| 1298 | completed = get_gp_seq() |
| 1299 | If pipe_count > 1 Then |
| 1305 | completed = rcutorture_seq_diff(completed, started) |
| 1306 | If completed > RCU_TORTURE_PIPE_LEN Then |
| 1308 | completed = RCU_TORTURE_PIPE_LEN |
| 1311 | preempt_enable() |
| 1313 | WARN_ON_ONCE(readstate & RCUTORTURE_RDR_MASK) |
| 1316 | If ( pipe_count > 1 || completed > 1 ) && Not xchg( & err_segs_recorded, 1) Then |
| 1323 | Return true |
| Name | Describe |
|---|---|
| rcu_torture_timer | RCU torture reader from timer handler. Dereferences rcu_torture_current,* incrementing the corresponding element of the pipeline array. The* counter in the element should never be greater than 1, otherwise, the* RCU implementation is broken. |
| rcu_torture_reader | RCU torture reader kthread. Repeatedly dereferences rcu_torture_current,* incrementing the corresponding element of the pipeline array. The* counter in the element should never be greater than 1, otherwise, the* RCU implementation is broken. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |