30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

32 CHAPTER 4. T-KERNEL/OS FUNCTIONS<br />

tk sta tsk<br />

Start Task<br />

[C Language Interface]<br />

ER ercd = tk_sta_tsk ( ID tskid, INT stacd ) ;<br />

[Parameters]<br />

ID tskid Task ID<br />

INT stacd Task start code<br />

[Return Parameters]<br />

ER ercd Error code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E OBJ<br />

Normal completion<br />

Invalid ID number (tskid is invalid or cannot be used)<br />

Object does not exist (the task designated in tskid does not exist)<br />

Invalid object state (the task is not in DORMANT state)<br />

[Description]<br />

Starts the task designated in tskid.<br />

This system call changes the state of the designated task from DORMANT state to READY state.<br />

Parameters to be passed to the task when it starts can be set in stacd. These parameters can be<br />

referred to from the started task, enabling use of this feature for simple message passing.<br />

The task priority when it starts is the task startup priority (itskpri) designated when the started task<br />

was created.<br />

Start requests by this system call are not queued. If this system call is issued while the target task is in<br />

a state other than DORMANT state, the system call is ignored and error code E OBJ is returned to the<br />

calling task.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!