-
cre_mpl
acre_mpl
-
Create variable-sized memory pool.
ER cre_mpl (ID mplid, T_CMPL *pk_cmpl );
ER_ID acre_mpl ( T_CMPL *pk_cmpl );
|
|
|
|
ID mplid;
|
ID number of the variable-sized memory pool.
|
|
T_CMPL *pk_cmpl;
|
Pointer to the packet containing the variable-sized memory pool creation information.
|
[Variable-sized memory pool creation information packet : T_CMPL]
typedef struct t_cmpl {
ATR mplatr; /*variable-sized memory pool attribute*/
SIZE mplsz; /*Size of variable-sized memory pool area (in bytes)*/
VP mpl; /*Start address of the variable-sized memory pool area*/
UINT maxblksz; /*maximum memory block size (in bytes)*/
} T_CMPL;
|
This service call can be called from tasks that belong to
Trusted Domain.
The cre_mpl creates a variable-sized memory pool with variable-sized memory pool ID indicated by
mplid according to the content of
pk_cmpl. The acre_mpl creates a variable-sized memory pool according to the content of
pk_cmpl, and returns the created variable-sized memory pool ID.
1 ) Variable-sized memory pool attribute (
mplatr)
Only TA_TFIFO can be specified for
mplatr.
-
TA_TFIFO ( = 0x0000)
Task wait queue is managed in FIFO order.
2 ) Size of variable-sized memory pool area (
mplsz), Start address of the variable-sized memory pool area (
mpl)
The application acquires
mplsz bytes of variable-sized memory pool area and specifies the start address for
mpl.
The
mpl must be 4-bytes boundary.
Note 1 The RI600PX is not concerned of anything of the access permission to the variable-sized memory pool area. To access to the memory block from task, the memory pool area must be in the memory object with appropriate permission.
Note, the RI600PX generates management tables in the memory pool area. If the management table is rewritten by allocation, correct system operation cannot be guaranteed.
Note 2 The
mITRON4.0 specification defines the function that the kernel allocates variable-sized memory pool area when NULL is specified for
mpl. But RI600PX does not support this function.
Note 3 The alignment number of memory block is 4.
3 ) Maximum memory block size (
maxblksz)
Specify the maximum memory block size for
maxblksz. Note, the maximum size of memory block that can be actually acquired might be larger than
maxblksz. For details, refer to "
9.3.1 Size of Variable-sized memory block".
|
|
|
|
|
Normal completion of acre_mpl. (Created variable-sized memory pool ID)
|
|
|
Normal completion of cre_mpl.
|
|
|
|
|
|
- maxblksz == 0, maxblksz > 0x0BFFFFF4
- mplsz is too small to maxblksz.
- mpl + mplsz > 0x100000000
- mpl is not 4-bytes boundary.
|
|
|
Invalid ID number. (only for cre_mpl)
|
|
|
- This service call was issued in the CPU locked state.
- This service call was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
|
|
|
- Stack pointer points out of user stack for invoking task.
- The operand-read access to the area indicated by pk_cmpl has not been permitted to the invoking task.
|
|
|
- The invoking task does not belong to trusted domain.
|
|
|
|
|
|
No ID number available.(only for acre_mpl)
|
|
|
Object state error. (only for cre_mpl)
- The variable-sized memory pool specified by mplid exists.
|