kra_creatp Kernel Service
Purpose
Creates a new kernel process and attaches the new kernel process to a resource set.
Syntax
#include <sys/rset.h>
int kra_creatp (pid, rstype, rsid, flags)
pid_t *pid;
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
Description
The kra_creatp kernel service creates a new kernel process and attaches the new kernel process to a resource set specified by the rstype and rsid parameters.
The kra_creatp kernel service can be used similar to the creatp kernel service for creating a new kernel process.
- The resource set must contain processors that are available in the system.
- The calling process must either have the root authority or have CAP_NUMA_ATTACH capability.
- The calling thread must not have a bindprocessor binding to a processor.
- The resource set must be contained in the partition resource set of the calling process.
Parameters
Item | Description |
---|---|
pid | Pointer to a pid_t field to receive the process ID of the new kernel process. |
rstype | Specifies the resource set type to which the new kernel process will be
attached. As defined in the rset.h file, this parameter must be set to the
following value: R_RSET: resource set. |
rsid | Identifies the resource set to which the new kernel process will be attached.
This rsid parameter accepts the following value: Resource set ID (for the rstype parameter value of R_RSET): set the rsid_t at_rset field to the resource set that you want. |
flags | Specifies how to create the new kernel process. The flags parameter
accepts the following value: R_NOINHERIT (or specify as 0): The new kernel process does not inherit the resource set attachments of the parent kernel process. |
Return Values
Upon successful completion, the kra_creatp kernel service returns a value of zero (0). If unsuccessful, the kra_creatp kernel service returns one of the following errors:
Item | Description |
---|---|
EINVAL | Indicates one of the following conditions:
|
ENODEV | The specified resource set does not contain any available processors. |
EFAULT | Invalid address. |
EPERM | Indicates one of the following conditions:
|
ENOMEM | There is not enough memory available to create a new kernel process. |