Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\ctrlmondata.c Create Date:2022-07-28 08:13:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rdtgroup_schemata_write

Proto:ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

Type:ssize_t

Parameter:

TypeParameterName
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
370  ret = 0
373  If nbytes == 0 || buf[nbytes - 1] != '\n' Then Return -EINVAL
375  buf[nbytes - 1] = '\0'
377  cpus_read_lock()
378  rdtgrp = rdtgroup_kn_lock_live( published fields )
379  If Not rdtgrp Then
380  rdtgroup_kn_unlock( published fields )
381  cpus_read_unlock()
382  Return -ENOENT
384  rdt_last_cmd_clear()
390  If mode == RDT_MODE_PSEUDO_LOCKED Then
391  ret = -EINVAL
392  rdt_last_cmd_puts("Resource group is pseudo-locked\n")
393  Go to out
397  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(dom, & domains, list)
398  have_new_ctrl = false
401  When ((tok = strsep - Split a string into tokens*@s: The string to be searched*@ct: The characters to search for* strsep() updates @s to point after the token, ready for the next call.* It returns empty tokens, too, behaving exactly like the libc function) != NULL) cycle
402  resname = strim - Removes leading and trailing whitespace from @s.*@s: The string to be stripped.* Note that the first trailing whitespace is replaced with a %NUL-terminator* in the given string @s. Returns a pointer to the first non-whitespace* character in @s.
403  If Not tok Then
404  rdt_last_cmd_puts("Missing ':'\n")
405  ret = -EINVAL
406  Go to out
408  If tok[0] == '\0' Then
409  rdt_last_cmd_printf("Missing '%s' value\n", resname)
410  ret = -EINVAL
411  Go to out
413  ret = rdtgroup_parse_resource(resname, tok, rdtgrp)
414  If ret Then Go to out
419  ret = update_domains(r, closid)
420  If ret Then Go to out
424  If mode == RDT_MODE_PSEUDO_LOCKSETUP Then
431  ret = dtgroup_pseudo_lock_create - Create a pseudo-locked region*@rdtgrp: resource group to which pseudo-lock region belongs* Called when a resource group in the pseudo-locksetup mode receives a* valid schemata that should be pseudo-locked
434  out :
435  rdtgroup_kn_unlock( published fields )
436  cpus_read_unlock()
437  Return If ret Else nbytes