sys/kern: Add USCHED_GET_CPUMASK for usched_set(2)
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 16 Jul 2016 01:49:15 +0000 (10:49 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 16 Jul 2016 12:07:46 +0000 (21:07 +0900)
commita3894d77992aebef1caea78feca25f9c68052149
tree0f52e606e31faea9102de165b03cef877a5d5c75
parent6e279e27dfa05662c35f719a51b9c78656f9eaed
sys/kern: Add USCHED_GET_CPUMASK for usched_set(2)

Add a new usched_set(2) command USCHED_GET_CPUMASK which simply
copies the cpumask of lwp to a pointer specified by userspace.

It's same as USCHED_GET_CPU except that USCHED_GET_CPU copies
the cpu id of lwp to userspace.

Many of the other kernels including Linux and FreeBSD have this
functionality via kernel specific syscalls, and not having it makes
some userspace programs difficult to port to DragonFly or support
the same feature sets that are available on other platforms.
lib/libc/sys/usched_set.2
sys/kern/kern_usched.c
sys/sys/usched.h