函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:membarrier_private_expedited

函数原型:static int membarrier_private_expedited(int flags)

返回类型:int

参数:

类型参数名称
intflags
136  mm等于mm
138  如果flags按位与MEMBARRIER_FLAG_SYNC_CORE
139  如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)则返回:负EINVAL
141  如果非atomic_read( & membarrier_state)按位与MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE_READY的值则返回:负EPERM
144  否则
145  如果非atomic_read( & membarrier_state)按位与MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY的值则返回:负EPERM
150  如果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或num_online_cpus()恒等于1则返回:0
157  smp_mb()
159  如果非zalloc_cpumask_var( & tmpmask, GFP_KERNEL)则返回:负ENOMEM
162  cpus_read_lock()
163  _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
164  遍历在线CPU(cpu)
175  如果cpu恒等于These macros fold the SMP functionality into a single CPU system()则继续下一循环
177  p等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(curr)
178  如果p内存信息恒等于mm__cpumask_set_cpu(cpu, tmpmask)
181  _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()
183  禁止抢占()
184  smp_call_function_many(tmpmask, ipi_mb, NULL, 1)
185  禁用抢占和中断()
187  释放CPU掩码
188  cpus_read_unlock()
195  smp_mb()
197  返回:0
调用者
名称描述
SYSCALL_DEFINE2sys_membarrier - issue memory barriers on a set of threads*@cmd: Takes command values defined in enum membarrier_cmd