18.2.207. PMIx_Node_pid_construct
PMIx_Node_pid_construct — Initialize a caller-provided
pmix_node_pid_t(5) structure.
18.2.207.1. SYNOPSIS
#include <pmix.h>
void PMIx_Node_pid_construct(pmix_node_pid_t *d);
18.2.207.1.1. Python Syntax
No Python equivalent
18.2.207.2. INPUT PARAMETERS
d: Pointer to the pmix_node_pid_t(5) structure to be initialized. The storage for the structure itself must already exist — it is supplied by the caller (typically declared on the stack or embedded within another object).
18.2.207.3. DESCRIPTION
Initialize the memory of a pmix_node_pid_t that
the caller has already allocated. The function sets the hostname pointer to
NULL, the nodeid field to UINT32_MAX, and the pid field to
-1.
No heap memory is allocated; the caller is responsible for populating the fields after construction.
18.2.207.4. RETURN VALUE
PMIx_Node_pid_construct returns no value (void).
18.2.207.5. NOTES
Because PMIx_Node_pid_construct operates on caller-provided storage, it must
be paired with PMIx_Node_pid_destruct(3)
to release any hostname payload the structure subsequently acquires. Do
not pass a constructed (as opposed to created) structure to
PMIx_Node_pid_free(3), as that would attempt
to free storage the library did not allocate.
An equivalent static initializer, PMIX_NODE_PID_STATIC_INIT, is available
for initializing a structure at the point of declaration.
18.2.207.6. EXAMPLES
Construct a structure:
pmix_node_pid_t np;
PMIx_Node_pid_construct(&np);