kwpar_r2vmap_pid Kernel Service

Purpose

Maps a real process ID to the equivalent virtual process ID assigned within a workload partition.

Syntax

#include <sys/wparid.h>

pid_t kwpar_r2vmap_pid ( kcidp, rpid)
cid_t * kcidp;
pid_t rpid;

Parameters

Item Description
kcidp A pointer to a memory location where the workload partition (WPAR) ID associated with the rpid parameter is returned.
rpid The real process ID on which to translate a real process ID to a virtual process ID.

Description

The kwpar_r2vmap_pid kernel service provides a mapping from a real process ID to a virtual process ID assigned within the workload partition. In most instances, the real and virtual process IDs are the same except in cases where the Workload Partition Mobility is in effect or for certain system services such as the init command which always have different real and virtual process IDs.

Usually kernel services dealing with process IDs only accept real process IDs. However, in some instances it might be necessary for kernel extensions, which communicate with other WPAR services or with processes within the WPAR, to know and communicate with virtual process IDs.

Execution Environment

The kwpar_r2vmap_pid kernel service can be called from the process environment only.

Return Values

If the kwpar_r2vmap_pid kernel service succeeds, it returns the virtual pid_t value associated with the rpid value provided on input. If the kernel service fails or if there is no virtual process ID associated with the rpid value, the rpid value is returned.