Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kthread function to register callbacks used to test RCU barriers.

Proto:static int rcu_torture_barrier_cbs(void *arg)

Type:int

Parameter:

TypeParameterName
void *arg
2029  myid = arg
2030  lastphase = 0
2034  init_rcu_head_on_stack( & rcu)
2035  VERBOSE_TOROUT_STRING("rcu_torture_barrier_cbs task started")
2036  set_user_nice(current process, MAX_NICE)
2037  Do
2038  wait_event - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_UNINTERRUPTIBLE) until the*@condition evaluates to true(Coordinate barrier testing. [myid], (newphase = smp_load_acquire( & Test phase. )) != lastphase || Is it time for the current torture test to stop?)
2042  lastphase = newphase
2043  If Is it time for the current torture test to stop? Then Break
2049  local_irq_disable()
2050  call( & rcu, Callback function for RCU barrier testing. )
2051  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
2052  If atomic_dec_and_test( & Barrier callbacks registered. ) Then wake_up( & barrier_wq)
2054  When Not Is it time for the current torture test to stop? cycle
2055  If (cb_barrier != NULL) Then cb_barrier()
2057  destroy_rcu_head_on_stack( & rcu)
2058  Each kthread must wait for kthread_should_stop() before returning from* its top-level function, otherwise segfaults ensue
2059  Return 0