Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cpuset.c Create Date:2022-07-28 11:17:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Common handling for a write to a "cpus" or "mems" file.

Proto:static ssize_t cpuset_write_resmask(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
2332  cs = css_cs(of_css(of))
2334  retval = -ENODEV
2336  buf = strstrip(buf)
2357  ss_get - obtain a reference on the specified css*@css: target css* The caller must already have a reference.
2358  kernfs_break_active_protection( published fields )
2359  lush_work - wait for a work to finish executing the last queueing instance*@work: the work to flush* Wait until @work has finished execution
2361  get_online_cpus()
2362  percpu_down_write( & cpuset_rwsem)
2363  If Not venient tests for these bits Then Go to out_unlock
2366  trialcs = alloc_trial_cpuset - allocate a trial cpuset*@cs: the cpuset that the trial cpuset duplicates
2367  If Not trialcs Then
2368  retval = -ENOMEM
2369  Go to out_unlock
2373  Case private == FILE_CPULIST
2375  Break
2376  Case private == FILE_MEMLIST
2378  Break
2379  Default
2380  retval = -EINVAL
2381  Break
2384  _cpuset - free the cpuset*@cs: the cpuset to be freed
2385  out_unlock :
2386  percpu_up_write( & cpuset_rwsem)
2387  put_online_cpus()
2388  kernfs_unbreak_active_protection( published fields )
2389  ss_put - put a css reference*@css: target css* Put a reference obtained via css_get() and css_tryget_online().
2390  lush_workqueue - ensure that any scheduled work has run to completion.*@wq: workqueue to flush* This function sleeps until all work items which were queued on entry* have finished execution, but it is not livelocked by new incoming ones.
2391  Return If retval Else nbytes