DragonFly On-Line Manual Pages

Search: Section:  


USCHED_SET(2)            DragonFly System Calls Manual           USCHED_SET(2)

NAME

usched_set -- setting up a proc's usched

LIBRARY

Standard C Library (libc, -lc)

SYNOPSIS

#include <sys/types.h> #include <sys/usched.h> int usched_set(pid_t pid, int cmd, void *data, int bytes);

DESCRIPTION

The usched_set() function is used to perform several user scheduler tasks. These tasks include: setting the user scheduler, assigning an LWP to a specific CPU, adding a CPU to the available CPUs for an LWP, and removing a CPU from the list of available CPUs for an LWP. The usched_set() function requires superuser privileges for all commands except USCHED_GET_CPU and USCHED_GET_CPUMASK. The cmd argument specifies the action for usched_set() to take: USCHED_SET_SCHEDULER set the user scheduler where data is a char * that contains the name of the user scheduler. USCHED_SET_CPU assign the LWP to the cpuid pointed to by data. USCHED_GET_CPU copy the LWP's CPU ID to the cpuid pointed to by data. USCHED_GET_CPUMASK copy the LWP's CPU mask to the cpumask_t type pointed to by data. USCHED_SET_CPUMASK set the LWP's CPU mask to the cpumask_t type pointed to by data. USCHED_ADD_CPU add the cpuid specified by data to the list of available CPUs for the LWP. USCHED_DEL_CPU remove the cpuid specified by data from the list of available CPUs for the LWP.

RETURN VALUES

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

ERRORS

The function will fail if: [EINVAL] The user scheduler to set is not in the list of available user schedulers. The bytes argument is not the correct size (int) for a cpuid. The specified cpuid is not set in smp_active_mask. Cmd contains an unknown value. [EFBIG] The specified cpuid is not a valid cpuid for the system. [EPERM] Deleting the specified cpuid leaves the LWP without a CPU to run on.

SEE ALSO

usched(8)

HISTORY

The usched_set() function call was added in DragonFly 1.9.

AUTHORS

The usched_set() system call was written by Matt Dillon. This manual page was written by Joe Talbott.

BUGS

Only pid equals current LWP PID or 0 is implemented. The current LWP PID is used for pid when pid is 0. One would normally only use 0 for pid. DragonFly 4.7 January 9, 2017 DragonFly 4.7

Search: Section: