krs_getpartition Subroutine

Purpose

Gets the partition resource set to which a process is attached.

Syntax

#include <sys/rset.h>
int krs_getpartition (pid, flags, rset, rset_type)
pid_t pid;
unsigned int flags;
rsethandle_t rset;
unsigned int *rset_type;

Description

The krs_getpartition subroutine returns the partition resource set attached to the specified process. A process ID value of RS_MYSELF indicates the partition resource set attached to the current process is requested.

Upon successful completion, the type of resource set is returned into the rset_type parameter.

A value of RS_PARTITION_RSET indicates the process has a partition resource set that is set explicitly. This may be set with the krs_setpartition subroutine or through the use of WLM work classes with resource sets.

A value of RS_DEFAULT_RSET indicates the process did not have an explicitly set partition resource set. The system default resource set is returned.

Parameters

Item Description
pid Specifies the process ID whose partition rset is requested.
flags Reserved for future use. Specify as 0.
rset Specifies the resource set to receive the process' partition resource set.
rset_type Points to an unsigned integer field to receive the resource set type.

Return Values

Upon successful completion, the krs_getpartition subroutine returns a 0. If unsuccessful, one or more of the following are true:
Item Description
EFAULT Invalid address.
ESRCH The process identified by the pid parameter does not exist.