- 66 -
[
[
[
[
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. The started task goes from DORMANT state to READY state or RUN-
NING state.
The following lists the processing performed on startup.
1. Initializes the current priority of the task.
2. Clears the number of queued wakeup requests.
3. Clears the number of suspension requests.
Specifying tskid=TSK_SELF(0) specifies the issuing task itself. The task has passed to it as parameter the extended infor-
mation of it that was specified when the task was created. If TSK_SELF is specified for tskid in non-task context, operation
of this service call cannot be guaranteed.
If the target task is not in DORMANT state, a task activation request by this service call is enqueued. In other words, the
activation request count is incremented by 1. The maximum value of the task activation request is 255. If this limit is ex-
ceeded, the error code E_QOVR is returned.
If TSK_SELF is specified for tskid, the issuing task itself is made the target task.
If this service call is to be issued from task context, use act_tsk; if issued from non-task context, use iact_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 task1( VP_INT stacd )
{
ER ercd;
:
ercd = act_tsk( ID_task2 );
:
}
void task2( VP_INT stacd )
{
:
ext_tsk();
}
<<Example statement in assembly language>>
.INCLUDE mr100.inc
.GLB
task
task:
:
PUSH.W
R2
act_tsk
#ID_TASK3
: