set a target CPU-Group for a process or its children
cg_bind directs the system in the placement of a process,
of subsequently executed process images or of process children.
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. In either case, an
attempt to bind a multi-threaded process will be rejected (a restriction
that may be relaxed in a future release).
The cgid parameter is the target CPU-Group; additional
values are reserved to mean:
The flags parameter may have the following values:
query without altering
bind to the CPU-Group to which the target process currently belongs
restore default binding behavior (with CGBIND_FORK only)
The pointers ocgid and oflags, if not NULL,
are used to pass back the values that were in effect prior to the call.
bind the target now
bind processes forked by the target
a reserved value with currently unimplemented functionality
On success, cg_bind returns 0.
On failure, cg_bind returns -1 and sets
errno to indicate the error:
For a CGBIND_NOW operation, the target CPU-Group is
ocgid or oflags points outside the allocated address space of the calling process.
idtype has an invalid value.
cgid does not refer to a valid CPU-Group.
flags has an invalid value.
A binding operation was attempted on a multi-threaded process.
The caller does not have appropriate privileges for this call. The
real or effective user ID of the calling process must match the real or
saved (from exec) user ID of the target process,
unless the caller has the P_OWNER privilege.
No process can be found corresponding to that specified by id.
The cg_bind call is not supported by the system.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004