Everything

pget_mpf

ipget_mpf

Outline
Acquire fixed-sized memory block (polling).
C format
 ER      pget_mpf (ID mpfid, VP *p_blk);
 ER      ipget_mpf (ID mpfid, VP *p_blk);
Parameter(s)
I/O
Parameter
Description
I
 ID      mpfid;
ID number of the fixed-sized memory pool.
O
 VP      *p_blk;
Start address of the acquired memory block.

Explanation
This service call acquires the fixed-sized memory block from the fixed-sized memory pool specified by parameter mpfid and stores the start address in the area specified by parameter p_blk.
If a fixed-sized memory block could not be acquired from the target fixed-sized memory pool (no available fixed-sized memory blocks exist) when this service call is issued, fixed-sized memory block acquisition processing is not performed but "E_TMOUT" is returned.
Note 1 The contents of the block are undefined.
Note 2 The alignment number of memory block is 1. Please perform the following, in order to enlarge the alignment number of memory blocks.
- Specify the memory block size to a multiple of the desired alignment number at creating the fixed-sized memory pool.
- Make the start address of the fixed-sized memory pool area into the address of the desired alignment number.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_PAR
-17
Parameter error.
- p_blk == NULL
E_ID
-18
Invalid ID number.
- mpfid < 0
- mpfid > VTMAX_MPF
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
Note When the ipget_mpf is issued from task or the pget_mpf is issued from non-task, the context error is not detected and normal operation of the system is not guaranteed.
E_MACV
-26
Memory access violation. (only for pget_mpf)
- Stack pointer points out of user stack for invoking task.
- The operand-write access to the area indicated by p_blk has not been permitted to the invoking task.
E_NOEXS
-42
Non-existent object.
- The fixed-sized memory pool specified by mpfid does not exist.
E_TMOUT
-50
Polling failure.