Adds a volatile context to the contexts defined by an application.
SPMI Library (libSpmi.a)
char *SpmiDdsAddCx(Ix, Path, Descr, Asnno) ushort Ix; char *Path, *Descr; int Asnno;
The SpmiDdsAddCx subroutine uses the shared memory area to inform the SPMI that a context is available to be added to the context hierarchy, moves a copy of the context to shared memory, and allocates memory for the data area.
Specifies the element number of the added context in the table of dynamic contexts. No context can be added if the table of dynamic contexts has not been defined in the SpmiDdsInit subroutine call. The first element of the table is element number 0.
Specifies the full path name of the context to be added. If the context is not at the top-level, the parent context must already exist.
Provides the description of the context to be added as it will be presented to data consumers.
Specifies the ASN.1 number to be assigned to the new context. All subcontexts on the same level as the new context must have unique ASN.1 numbers. Typically, each time the SpmiDdsAddCx subroutine adds a subcontext to the same parent context, the Asnno parameter is incremented. See Making Dynamic Data-Supplier Statistics Unique for more information about ASN.1 numbers.
If successful, the SpmiDdsAddCx subroutine returns the address of the shared memory data area. If an error occurs, an error text is placed in the external SpmiErrmsg character array, and the subroutine returns a NULL value.
All SPMI subroutines use external variables to provide error information. To access these variables, an application program must define the following external variables:
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. See the List of SPMI Error Codes for more information.
This subroutine is part of the server option of the Performance Aide for AIX licensed product and is also included in the Performance Toolbox for AIX licensed product.
|/usr/include/sys/Spmidef.h||Declares the subroutines, data structures, handles, and macros that an application program can use to access the SPMI.|
For related information, see: