函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-27 17:20:22
Last Modify:2022-05-23 17:02:55 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:slabinfo_write - Tuning for the slab allocator*@file: unused*@buffer: user buffer*@count: data length*@ppos: unused* Return: %0 on success, negative error code otherwise.

函数原型:ssize_t slabinfo_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buffer
size_tcount
loff_t *ppos
4171  如果count大于MAX_SLABINFO_WRITE则返回:负EINVAL
4173  如果copy_from_user( & kbuf, buffer, count)则返回:负EFAULT
4175  kbuf[MAX_SLABINFO_WRITE]等于'\0'
4177  tmp等于strchr(kbuf, ' ')
4178  如果非tmp则返回:负EINVAL
4180  tmp等于'\0'
4181  tmp自加
4182  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments不等于3则返回:负EINVAL
4186  mutex_lock( & slab_mutex)
4187  res等于负EINVAL
4189  如果非字符串比较
4190  如果limit小于1或batchcount小于1或batchcount大于limitshared小于0则
4192  res等于0
4193  否则
4198  退出
4201  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4202  如果res大于等于0则res等于count
4204  返回:res