- 79 -
ref_tsk
Reference task status
iref_tsk
Reference task status (handler only)
[
[
[
[
C
C
L
L
a
a
n
n
g
g
u
u
a
a
g
g
e
e
A
A
P
P
I
I
]
]
]
]
ER ercd = ref_tsk( ID tskid, T_RTSK *pk_rtsk );
ER ercd = iref_tsk( ID tskid, T_RTSK *pk_rtsk );
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
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
R
e
e
t
t
u
u
r
r
n
n
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
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
A
s
s
s
s
e
e
m
m
b
b
l
l
y
y
l
l
a
a
n
n
g
g
u
u
a
a
g
g
e
e
A
A
P
P
I
I
]
]
]
]
.include mr100.inc
ref_tsk TSKID, PK_RTSK
iref_tsk TSKID, PK_RTSK
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
TSKID
ID number of the target task
PK_RTSK
Pointer to the packet to which task status is returned
z
z
R
R
e
e
g
g
i
i
s
s
t
t
e
e
r
r
c
c
o
o
n
n
t
t
e
e
n
n
t
t
s
s
a
a
f
f
t
t
e
e
r
r
s
s
e
e
r
r
v
v
i
i
c
c
e
e
c
c
a
a
l
l
l
l
i
i
s
s
i
i
s
s
s
s
u
u
e
e
d
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
E
r
r
r
r
o
o
r
r
c
c
o
o
d
d
e
e
]
]
]
]
None