cg_ids(2)


cg_ids -- return the CPU-Groups in the system

Synopsis

#include <sys/cguser.h>

int cg_ids( int selector, int ncgids, cgid_t *cgid_array);

Description

cg_ids obtains a list of the CPU-Groups within the system and stores the result in the array of CPU-Group IDs specified by cgid_array. This array has the number of entries in ncgids and must be large enough to contain the entire list.

The selector parameter takes the value CG_ONLINE.

Return values

On success, cg_ids returns the number of CPU-Groups within the system. On failure, cg_ids returns a value of -1 and sets errno to indicate the error:

[EINVAL]
the selector contains an invalid value.

[ENOSPC]
the value of ncgids is less than the number of appropriate CPU-Groups in the system.

[EFAULT]
a referenced part of the array pointed to by cgid_array is outside of the allocated address space of the process.

[ENOSYS]
the cg_ids call is not supported by the system.

References

cg_processors(2), cg_info(2), sysconf(3C)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004