LAPI_Addr_get Subroutine
Purpose
Retrieves a function address that was previously registered using LAPI_Addr_set.
Library
Availability Library (liblapi_r.a)
C Syntax
#include <lapi.h>
int LAPI_Addr_get(hndl, addr, addr_hndl)
lapi_handle_t hndl;
void **addr;
int addr_hndl;
FORTRAN Syntax
include 'lapif.h'
LAPI_ADDR_GET(hndl, addr, addr_hndl, ierror)
INTEGER hndl
INTEGER (KIND=LAPI_ADDR_TYPE) :: addr
INTEGER addr_hndl
INTEGER ierror
Description
Type of call: local address manipulation
Use this subroutine to get the pointer that was previously registered with LAPI and is associated with the index addr_hndl. The value of addr_hndl must be in the range 1 <= addr_hndl < LOC_ADDRTBL_SZ.
Parameters
- INPUT
- hndl
- Specifies the LAPI handle.
- addr_hndl
- Specifies the index of the function address to retrieve. You should have previously registered the address at this index using LAPI_Addr_set. The value of this parameter must be in the range 1 <= addr_hndl < LOC_ADDRTBL_SZ.
- OUTPUT
- addr
- Returns a function address that the user registered with LAPI.
- ierror
- Specifies a FORTRAN return code. This is always the last parameter.
C Examples
To retrieve
a header handler address that was previously registered using LAPI_Addr_set:
lapi_handle_t hndl; /* the LAPI handle */
void **addr; /* the address to retrieve */
int addr_hndl; /* the index returned from LAPI_Addr_set */
⋮
addr_hndl = 1;
LAPI_Addr_get(hndl, &addr, addr_hndl);
/* addr now contains the address that was previously registered */
/* using LAPI_Addr_set */
Return Values
- LAPI_SUCCESS
- Indicates that the function call completed successfully.
- LAPI_ERR_ADDR_HNDL_RANGE
- Indicates that the value of addr_hndl is not in the range 1 <= addr_hndl < LOC_ADDRTBL_SZ.
- LAPI_ERR_HNDL_INVALID
- Indicates that the hndl passed in is not valid (not initialized or in terminated state).
- LAPI_ERR_RET_PTR_NULL
- Indicates that the value of the addr pointer is NULL (in C) or that the value of addr is LAPI_ADDR_NULL (in FORTRAN).
Location
- /usr/lib/liblapi_r.a