cpuset(2): add kern_cpuset

Effort:		CHERI upstreaming
Sponsored by:	 Innovate UK
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2284
This commit is contained in:
Brooks Davis committed 2026-11-07 12:10:46 +00:00
1 parent d7c0ab90cd
commit 3369af6f98
2 files changed
+8 -2

No files matched your search

+7 -2
View File
@@ -1843,6 +1843,12 @@ struct cpuset_args {
#endif
int
sys_cpuset(struct thread *td, struct cpuset_args *uap)
{
return (kern_cpuset(td, uap->setid));
}
int
kern_cpuset(struct thread *td, cpusetid_t *setid)
{
struct cpuset *root;
struct cpuset *set;
@@ -1856,7 +1862,7 @@ sys_cpuset(struct thread *td, struct cpuset_args *uap)
cpuset_rel(root);
if (error)
return (error);
error = copyout(&set->cs_id, uap->setid, sizeof(set->cs_id));
error = copyout(&set->cs_id, setid, sizeof(set->cs_id));
if (error == 0)
error = cpuset_setproc(-1, set, NULL, NULL, false);
cpuset_rel(set);
@@ -1873,7 +1879,6 @@ struct cpuset_setid_args {
int
sys_cpuset_setid(struct thread *td, struct cpuset_setid_args *uap)
{
return (kern_cpuset_setid(td, uap->which, uap->id, uap->setid));
}
+1
View File
@@ -151,6 +151,7 @@ int kern_connectat(struct thread *td, int dirfd, int fd,
struct sockaddr *sa);
int kern_copy_file_range(struct thread *td, int infd, off_t *inoffp,
int outfd, off_t *outoffp, size_t len, unsigned int flags);
int kern_cpuset(struct thread *td, cpusetid_t *setid);
int kern_cpuset_getaffinity(struct thread *td, cpulevel_t level,
cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask);
int kern_cpuset_setaffinity(struct thread *td, cpulevel_t level,