Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Returns true if the task does not share ->mm with another thread/process.

Proto:bool current_is_single_threaded(void)

Type:bool

Parameter:Nothing

17  task = current process
18  mm = mm
22  If atomic_read( & live) != 1 Then Return false
25  If atomic_read( & *@mm_users: The number of users including userspace. * Use mmget()/mmget_not_zero()/mmput() to modify. When this * drops to 0 (i.e. when the task exits and there are no other * temporary reference holders), we also release a reference on *@mm_count (which ) == 1 Then Return true
28  ret = false
29  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
31  If Value for the false possibility is greater at compile time( Per task flags (PF_*), defined further below: & I am a kernel thread ) Then Continue
33  If Value for the false possibility is greater at compile time(p == group_leader) Then Continue
36  for_each_thread(p, t)
37  If Value for the false possibility is greater at compile time(mm == mm) Then Go to found
39  If Value is more likely to compile time(mm) Then Break
46  smp_rmb()
49  ret = true
50  found :
51  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
53  Return ret