kwpar_r2vmap_tid Kernel Service

Purpose

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

Syntax

#include <sys/wparid.h>

tid_t kwpar_r2vmap_tid ( kcidp, rtid)
cid_t * kcidp;
tid_t rtid;

Parameters

Item Description
kcidp A pointer to a memory location where the WPAR ID associated with the rtid parameter is returned.
rtid The real thread ID on which to translate a real process ID to a virtual process ID.

Description

The kwpar_r2vmap_tid kernel service provides a mapping from a real thread ID to a virtual thread ID assigned within the workload partition. In most instances, the real and virtual thread IDs are the same except in cases where the Workload Partition Mobility is in effect.

Normally kernel services dealing with thread IDs accept only real thread 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 thread IDs.

Execution Environment

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

Return Values

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