tk_ref_mpl
Reference Variable-size Memory Pool Status
ER ercd = tk_ref_mpl ( ID mplid, T_RMPL *pk_rmpl ) ;
ID mplid Variable-size memory pool ID
T_RMPL* pk_rmpl Address of packet for returning status information
ER ercd Error code
pk_rmpl details:
VP exinf Extended information
ID wtsk Waiting task information
W frsz Free memory size (in bytes)
W maxsz Maximum memory space size (in bytes)
(Other implementation-dependent parameters may be added beyond this point.)
E_OK Normal completion
E_ID Invalid ID number (mplid is invalid or cannot be used)
E_NOEXS Object does not exist (the variable-size memory pool specified in mplid does not exist)
E_PAR Parameter error (the address of the return parameter packet cannot be used)
References the status of the variable-size memory pool specified in mplid, passing in return parameters the size of the total free space (frsz), the maximum size of memory immediately available (maxsz), waiting task information (wtsk), and extended information (exinf).
wtsk indicates the ID of a task waiting for memory block allocation from this variable-size memory pool. If multiple tasks are waiting for the variable-size memory pool, the ID of the task at the head of the queue is returned. If there are no waiting tasks, wtsk = 0 is returned. If the variable-size memory pool specified with tk_ref_mpl does not exist, error code E_NOEXS is returned.
frsz and maxsz , the member of T_RMPL, are of W type instead of INT type.

Comments
Click here to Post a Comment