SpmiGetCx Subroutine
Purpose
Returns a pointer to the SpmiCx structure corresponding to a specified context handle.
Library
SPMI Library (libSpmi.a)
Syntax
#include sys/Spmidef.h
struct SpmiCx *SpmiGetCx(CxHandle)
SpmiCxHdl CxHandle;
Description
The SpmiGetCx subroutine returns a pointer to the SpmiCx structure corresponding to the context handle identified by the CxHandle parameter.
This subroutine is part of the server option of the Performance Aide for AIX® licensed product.
Parameters
- CxHandle
-
Specifies a valid SpmiCxHdl handle as obtained by another subroutine call.
Return Values
The SpmiGetCx subroutine returns a a pointer to an SpmiCx data structure if successful. If unsuccessful, the subroutine returns NULL.
Error Codes
All SPMI subroutines use external variables to provide error information. To access these variables, an application program must define the following external variables:
- extern char SpmiErrmsg[];
- extern int SpmiErrno;
If the subroutine returns without an error, the SpmiErrno variable is set to 0 and the SpmiErrmsg character array is empty. If an error is detected, the SpmiErrno variable returns an error code, as defined in the sys/Spmidef.h file, and the SpmiErrmsg variable contains text, in English, explaining the cause of the error.
Files
Item | Description |
---|---|
/usr/include/sys/Spmidef.h | Declares the subroutines, data structures, handles, and macros that an application program can use to access the SPMI. |