函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\rdtgroup.c Create Date:2022-07-27 09:11:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dtgroup_mode_write - Modify the resource group's mode

函数原型:static ssize_t rdtgroup_mode_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

返回类型:ssize_t

参数:

类型参数名称
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
1180  ret等于0
1183  如果nbytes恒等于0或buf[nbytes - 1]不等于'\n'则返回:负EINVAL
1185  buf[nbytes - 1]等于'\0'
1187  rdtgrp等于rdtgroup_kn_lock_live( published fields )
1188  如果非rdtgrp
1189  rdtgroup_kn_unlock( published fields )
1190  返回:负ENOENT
1193  rdt_last_cmd_clear()
1195  mode等于mode
1197  如果非字符串比较mode恒等于RDT_MODE_SHAREABLE或非字符串比较mode恒等于RDT_MODE_EXCLUSIVE或非字符串比较mode恒等于RDT_MODE_PSEUDO_LOCKSETUP或非字符串比较mode恒等于RDT_MODE_PSEUDO_LOCKED则转到:out
1204  如果mode恒等于RDT_MODE_PSEUDO_LOCKED
1205  rdt_last_cmd_puts("Cannot change pseudo-locked group\n")
1206  ret等于负EINVAL
1207  转到:out
1210  如果非字符串比较
1211  如果mode恒等于RDT_MODE_PSEUDO_LOCKSETUP
1213  如果ret则转到:out
1216  mode等于RDT_MODE_SHAREABLE
1217  否则如果非字符串比较
1219  ret等于负EINVAL
1220  转到:out
1222  如果mode恒等于RDT_MODE_PSEUDO_LOCKSETUP
1224  如果ret则转到:out
1227  mode等于RDT_MODE_EXCLUSIVE
1228  否则如果非字符串比较
1229  ret等于dtgroup_locksetup_enter - Resource group enters locksetup mode*@rdtgrp: resource group requested to enter locksetup mode* A resource group enters locksetup mode to reflect that it would be used* to represent a pseudo-locked region and is in the process of
1230  如果ret则转到:out
1232  mode等于RDT_MODE_PSEUDO_LOCKSETUP
1233  否则
1234  rdt_last_cmd_puts("Unknown or unsupported mode\n")
1235  ret等于负EINVAL
1238  out :
1239  rdtgroup_kn_unlock( published fields )
1240  返回:如果ret否则nbytes