[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Base Operating System and Extensions, Volume 2
ra_detachrset Subroutine
Purpose
Detaches a work component from a resource set.
Library
Standard C library (libc.a)
Syntax
#include <sys/rset.h>
int ra_detachrset (rstype, rsid, flags)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
Description
The ra_detachrset subroutine detaches a work component
specified by rstype and rsid from
a resource set.
The work component is an existing process identified by the process ID.
A process ID value of RS_MYSELF indicates the detach command applies to the
current process.
The following conditions must be met to detach a process from a resource
set:
- The calling process must either have root authority or have CAP_NUMA_ATTACH
capability.
- The calling process must either have root authority or the same effective
userid as the target process.
If these conditions are not met, the operation will fail.
Once a process is detached from a resource set, the threads in the process
can run on all available processors contained in the process' partition resource
set.
Parameters
rstype |
Specifies the type of work component to be detached
from to the resource set specified by rset. This parameter
must be the following value, defined in rset.h:
- R_PROCESS: existing process
|
rsid |
Identifies the work component to be attached to the
resource set specified by rset. This parameter must
be the following:
- Process ID (for rstype of R_PROCESS): set the rsid_t at_pid field to the desired process' process ID.
|
flags |
Reserved for future use. Specify as 0. |
Return Values
If successful, a value of 0 is returned. If unsuccessful, a value of -1
is returned, and the errno global variable is set to
indicate the error.
Error Codes
The ra_detachrset subroutine is unsuccessful if one
or more of the following are true:
EINVAL |
One of the following is true:
- The flags parameter contains an invalid value.
- The rstype parameter contains an invalid type
qualifier.
|
ESRCH |
The process identified by the rstype and rsid parameters does not exist. |
EPERM |
One of the following is true:
- The calling process has neither root authority nor CAP_NUMA_ATTACH attachment
privilege.
- The calling process has neither root authority nor the same effective
user ID as the process identified by the rstype and rsid parameters.
|
Related Information
ra_fork Subroutine, ra_exec Subroutine, ra_getrset Subroutine,
and ra_attachrset Subroutine.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]