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

Function sys_cpuset

freebsd/kern/kern_cpuset.c:1741–1761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1739};
1740#endif
1741int
1742sys_cpuset(struct thread *td, struct cpuset_args *uap)
1743{
1744 struct cpuset *root;
1745 struct cpuset *set;
1746 int error;
1747
1748 thread_lock(td);
1749 root = cpuset_refroot(td->td_cpuset);
1750 thread_unlock(td);
1751 set = NULL;
1752 error = cpuset_create(&set, root, &root->cs_mask);
1753 cpuset_rel(root);
1754 if (error)
1755 return (error);
1756 error = copyout(&set->cs_id, uap->setid, sizeof(set->cs_id));
1757 if (error == 0)
1758 error = cpuset_setproc(-1, set, NULL, NULL, false);
1759 cpuset_rel(set);
1760 return (error);
1761}
1762
1763#ifndef _SYS_SYSPROTO_H_
1764struct cpuset_setid_args {

Callers

nothing calls this directly

Calls 5

cpuset_refrootFunction · 0.85
cpuset_createFunction · 0.85
cpuset_relFunction · 0.85
cpuset_setprocFunction · 0.85
copyoutFunction · 0.50

Tested by

no test coverage detected