| 1739 | }; |
| 1740 | #endif |
| 1741 | int |
| 1742 | sys_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_ |
| 1764 | struct cpuset_setid_args { |
nothing calls this directly
no test coverage detected