MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kern_cpuset_setid

Function kern_cpuset_setid

freebsd/kern/kern_cpuset.c:1777–1795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775}
1776
1777int
1778kern_cpuset_setid(struct thread *td, cpuwhich_t which,
1779 id_t id, cpusetid_t setid)
1780{
1781 struct cpuset *set;
1782 int error;
1783
1784 /*
1785 * Presently we only support per-process sets.
1786 */
1787 if (which != CPU_WHICH_PID)
1788 return (EINVAL);
1789 set = cpuset_lookup(setid, td);
1790 if (set == NULL)
1791 return (ESRCH);
1792 error = cpuset_setproc(id, set, NULL, NULL, false);
1793 cpuset_rel(set);
1794 return (error);
1795}
1796
1797#ifndef _SYS_SYSPROTO_H_
1798struct cpuset_getid_args {

Callers 1

sys_cpuset_setidFunction · 0.85

Calls 3

cpuset_lookupFunction · 0.85
cpuset_setprocFunction · 0.85
cpuset_relFunction · 0.85

Tested by

no test coverage detected