- 79 -
ref_tsk Reference task status iref_tsk Reference task status (handler only)
[
[[
[
C
C
L
La
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
ER ercd = ref_tsk( ID tskid, T_RTSK *pk_rtsk );
ER ercd = iref_tsk( ID tskid, T_RTSK *pk_rtsk );
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
ID tskid ID number of the target task
T_RTSK *pk_rtsk Pointer to the packet to which task status is returned
z
z
R
Re
et
tu
ur
rn
n
P
Pa
ar
ra
am
me
et
te
er
rs
s
ER ercd Terminated normally (E_OK)
Contents of pk_rtsk
typedef struct t_rtsk{
STAT tskstat +0 2 Task status
PRI tskpri +2 2 Current priority of task
PRI tskbpri +4 2 Base priority of task
STAT tskwait +6 2 Cause of wait
ID wobjid +8 2 Waiting object ID
TMO lefttmo +10 4 Left time before timeout
UINT actcnt +14 4 Number of queued activation request counts
UINT wupcnt +18 4 Number of queued wakeup request counts
UINT suscnt +22 4 Number of nested suspension request counts
} T_RTSK;
[
[[
[
A
As
ss
se
em
mb
bl
ly
y
l
la
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
.include mr100.inc
ref_tsk TSKID, PK_RTSK
iref_tsk TSKID, PK_RTSK
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
TSKID ID number of the target task
PK_RTSK Pointer to the packet to which task status is returned
z
z
R
Re
eg
gi
is
st
te
er
r
c
co
on
nt
te
en
nt
ts
s
a
af
ft
te
er
r
s
se
er
rv
vi
ic
ce
e
c
ca
al
ll
l
i
is
s
i
is
ss
su
ue
ed
d
Register name Content after service call is issued
R0 Error code
R2 ID number of the target task
A1 Pointer to the packet to which task status is returned
[
[[
[
E
Er
rr
ro
or
r
c
co
od
de
e
]
]]
]
None