函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Function to handle write request* When idx = reset_cnts, reset all the counts.

函数原型:static ssize_t lockevent_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *user_buf
size_tcount
loff_t *ppos
96  如果s or device private pointer 不等于LOCKEVENT_reset_cnts则返回:count
99  遍历可用CPU(cpu)
101  ptr等于per_cpu_ptr(Per-cpu counts, cpu)
103 i小于 # of write lock handoffs 循环WRITE_ONCE(ptr[i], 0)
106  返回:count