cg_current(2)


cg_current -- obtain identifier for the current CPU-Group

Synopsis

#include <sys/cguser.h>

cgid_t cg_current( idtype_t idtype, id_t id);

Description

cg_current returns the identity of the CPU-Group to which the specified process or LWP belongs.

The combination of idtype and id specifies the process or LWP of interest. When idtype is P_PID, id is interpreted as a process id; the special value P_MYID may be used as shorthand for the calling process. When idtype is P_LWPID, id is interpreted as the LWP id of an LWP within the calling process; the special value P_MYID may be used as shorthand for the calling LWP.

Return values

On success, cg_current returns a CPU-Group identifier. On failure, cg_current returns (cgid_t)-1 and sets errno to indicate the error:

[EINVAL]
idtype has an invalid value.

[EINVAL]
An invalid process or LWP id was supplied.

[ESRCH]
No process can be found corresponding to that specified by id.

[ENOSYS]
The cg_current call is not supported by the system.

References

cg_memloc(2)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004