sys/kern: Add USCHED_GET_CPUMASK for usched_set(2)

Operating Systems / DragonFlyBSD - Tomohiro Kusumi [gmail.com] - 16 July 2016 07:07 UTC

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.

a3894d7 sys/kern: Add USCHED_GET_CPUMASK for usched_set(2)
lib/libc/sys/usched_set.2 | 9 +++++++--
sys/kern/kern_usched.c | 8 ++++++++
sys/sys/usched.h | 1 +
3 files changed, 16 insertions(+), 2 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share