- 145 -
[
[[
[
F
Fu
un
nc
ct
ti
io
on
na
al
l
d
de
es
sc
cr
ri
ip
pt
ti
io
on
n
]
]]
]
This service call acquires a memory block from the variable-size memory pool indicated by mplid and stores the
start address of the acquired memory block in the variable p_blk. The content of the acquired memory block is in-
determinate.
If the specified variable-size memory pool has no memory blocks in it, the task returns immediately and responds to
the call with the error code E_TMOUT.
This service call can be issued only from task context. It cannot be issued from non-task context.
[
[[
[
E
Ex
xa
am
mp
pl
le
e
p
pr
ro
og
gr
ra
am
m
s
st
ta
at
te
em
me
en
nt
t
]
]]
]
<<Example statement in C language>>
#include <itron.h>
#include <kernel.h>
#include “kernel_id.h”
VP p_blk;
void task()
{
if( pget_mpl(ID_mpl , 200, &p_blk) != E_OK ){
error(“Not enough memory\n”);
}
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
task: :
PUSH.W R2
pget_mpl #ID_MPL1,#200
: