Detaches a work component from a resource set.
#include <sys/rset.h>
int kra_detachrset (rstype, rsid, flags)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
The kra_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 or an existing kernel thread identified by the kernel thread ID (tid). A process ID or thread ID value of RS_MYSELF indicates the detach command applies to the current process or the current kernel thread, respectively.
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. Once a kernel thread is detached from a resource set, that thread can run on all available processors contained in its process effective or partition resource set.
Item | Description |
---|---|
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:
|
rsid | Identifies the work component to be attached
to the resource set specified by rset. This parameter must
be the following:
|
flags | For rstype of R_PROCESS, the R_DETACH_ALLTHRDS indicates that R_THREAD rsets are detached from all threads in a specified process. The process' effective rset is not detached in this case. Reserved for future use. Specify as 0. |
Item | Description |
---|---|
EINVAL | One of the following is true:
|
ESRCH | The process or kernel thread identified by the rstype and rsid parameters does not exist. |
EPERM | One of the following is true:
|