- 70 -
[
[
[
[
F
F
u
u
n
n
c
c
t
t
i
i
o
o
n
n
a
a
l
l
d
d
e
e
s
s
c
c
r
r
i
i
p
p
t
t
i
i
o
o
n
n
]
]
]
]
This service call starts the task indicated by tskid. In other words, it places the specified task from DORMANT state into
READY state or RUNNING state. This service call does not enqueue task activation requests. Therefore, if a task activa-
tion request is issued while the target task is not DORMANT state, the error code E_OBJ is returned to the service call is-
suing task. This service call is effective only when the specified task is in DORMANT state. The task start code stacd is 32
bits long. This task start code is passed as parameter to the activated task.
If a task is restarted that was once terminated by ter_tsk or ext_tsk, the task performs the following as it starts up.
1. Initializes the current priority of the task.
2. Clears the number of queued wakeup requests.
3. Clears the number of nested forcible wait requests.
If this service call is to be issued from task context, use sta_tsk; if issued from non-task context, use ista_tsk.
[
[
[
[
E
E
x
x
a
a
m
m
p
p
l
l
e
e
p
p
r
r
o
o
g
g
r
r
a
a
m
m
s
s
t
t
a
a
t
t
e
e
m
m
e
e
n
n
t
t
]
]
]
]
<<Example statement in C language>>
#include <itron.h>
#include <kernel.h>
#include “kernel_id.h”
void task()
{
ER
ercd;
VP_INT stacd = 0;
ercd = sta_tsk( ID_task2, stacd );
:
}
void task2(VP_INT msg)
{
if(msg == 0)
:
}
<<Example statement in assembly language>>
.INCLUDE mr100.inc
.GLB
task
task:
:
PUSHM
R3R1
PUSH.W
R2
sta_tsk #ID_TASK4,#100
:
Содержание Emulator System M3T-MR100
Страница 3: ...M3T MR100 4 V 1 00 User s Manual User s Manual Rev 1 00 2007 09 Real time OS for R32C 100 Series...
Страница 6: ......
Страница 14: ......
Страница 16: ...xii...
Страница 18: ......
Страница 78: ......
Страница 242: ......
Страница 269: ...253 235 entry_address alm2 236 name ID_alm2 237 exinf 0x12345678 238 239 240 241 242 End of Configuration 243...
Страница 279: ...263...
Страница 290: ......
Страница 294: ......
Страница 304: ...288...
Страница 306: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M3T MR100 4 V 1 00 REJ10J1523 0100 User s Manual...