函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns true if the task does not share ->mm with another thread/process.

函数原型:bool current_is_single_threaded(void)

返回类型:bool

参数:

17  task等于当前进程
18  mm等于内存信息
22  如果atomic_read( & live)不等于1则返回:false
25  如果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则返回: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  如果此条件成立可能性小(为编译器优化)(任务标志 & I am a kernel thread )则继续下一循环
33  如果此条件成立可能性小(为编译器优化)(p == 线程组主管)则继续下一循环
36  for_each_thread(p, t)
37  如果此条件成立可能性小(为编译器优化)(内存信息 == mm)则转到:found
39  如果此条件成立可能性大(为编译器优化)(内存信息)则退出
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  返回:ret
调用者
名称描述
check_unshare_flagsCheck constraints on flags passed to the unshare system call.
selinux_setprocattr