Reference

cpuset(3)

utility functions for cpuset(2) handling

NAME

cpuset_parselist, domainset_parselist – utility functions for cpuset(2) handling

LIBRARY

System Utilities Library (libutil, -lutil)

SYNOPSIS

#include <sys/cpuset.h>

#include <libutil.h>

int

cpuset_parselist(const char *cpu_list, cpuset_t *mask);

int

domainset_parselist(const char *domain_policy, domainset_t *domain_mask, int *policyp);

DESCRIPTION

The cpuset_parselist() function parses a cpu-list filling the mask.

The cpu-list may include numbers separated by '-' for ranges and commas separating individual numbers. A special list of “all” may be specified in which case the list includes all CPUs from the root set.

The domainset_parselist() function parses a domainset(9) memory domain allocation policy specified by domain_policy filling the domain_mask and the policyp. A valid domain_policy is formatted as policy:domain-list. See the -n flag in cpuset(1) for a list of valid domain policies.

RETURN VALUES

Return values can be the following

CPUSET_PARSE_OK

The parsing was successful

CPUSET_PARSE_ERROR

The cpu-list or domain-policy format is invalid

CPUSET_PARSE_GETAFFINITY

The cpuset_getaffinity(2) call has failed

CPUSET_PARSE_INVALID_CPU

The number of supported CPUs or NUMA domains has been exceeded. The maximum number being CPU_SETSIZE and DOMAINSET_SETSIZE respectively.

CPUSET_PARSE_GETDOMAIN

The cpuset_getdomain(2) call has failed

SEE ALSO

cpuset(1), cpuset(2), numa(4), cpuset(9), domainset(9)

AUTHORS

Jeffrey Roberson ⟨[email protected]⟩

History