| 1775 | } |
| 1776 | |
| 1777 | int |
| 1778 | kern_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_ |
| 1798 | struct cpuset_getid_args { |
no test coverage detected