Function report | 
Source Code:arch\x86\kernel\cpu\resctrl\rdtgroup.c | 
Create Date:2022-07-28 08:11:21 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:dtgroup_mode_write - Modify the resource group's mode
Proto:static ssize_t rdtgroup_mode_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)
Type:ssize_t
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct kernfs_open_file * | of | |
| char * | buf | |
| size_t | nbytes | |
| loff_t | off | 
| 1180 | ret = 0 | 
| 1187 | rdtgrp = rdtgroup_kn_lock_live( published fields ) | 
| 1188 | If Not rdtgrp Then | 
| 1189 | rdtgroup_kn_unlock( published fields ) | 
| 1190 | Return -ENOENT | 
| 1193 | rdt_last_cmd_clear() | 
| 1197 | If Not strcmp(buf, "shareable") && mode == RDT_MODE_SHAREABLE || Not strcmp(buf, "exclusive") && mode == RDT_MODE_EXCLUSIVE || Not strcmp(buf, "pseudo-locksetup") && mode == RDT_MODE_PSEUDO_LOCKSETUP || Not strcmp(buf, "pseudo-locked") && mode == RDT_MODE_PSEUDO_LOCKED Then Go to out | 
| 1204 | If mode == RDT_MODE_PSEUDO_LOCKED Then | 
| 1211 | If mode == RDT_MODE_PSEUDO_LOCKSETUP Then | 
| 1216 | mode = RDT_MODE_SHAREABLE | 
| 1222 | If mode == RDT_MODE_PSEUDO_LOCKSETUP Then | 
| 1227 | mode = RDT_MODE_EXCLUSIVE | 
| 1232 | mode = RDT_MODE_PSEUDO_LOCKSETUP | 
| 1233 | Else | 
| 1234 | rdt_last_cmd_puts("Unknown or unsupported mode\n") | 
| 1238 | out : | 
| 1239 | rdtgroup_kn_unlock( published fields ) | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |