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.

6.1. KERNEL INTERNAL STATE ACQUISITION FUNCTIONS 271<br />

td set reg<br />

Set Task Register<br />

[C Language Interface]<br />

ER ercd = td_set_reg ( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs ) ;<br />

[Parameters]<br />

ID tskid Task ID (TSK SELF cannot be designated)<br />

T REGS pk regs General registers<br />

T EIT pk eit Registers saved when exception is raised<br />

T CREGS pk cregs Control registers<br />

The contents of T REGS, T EIT, and T CREGS are defined for each CPU and implementation.<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 (issued for current RUN state task)<br />

[Description]<br />

Sets registers of the task designated in tskid. This is similar to tk set reg.<br />

Registers cannot be set for the task currently in RUN state. Except when a task-independent portion<br />

is executing, the current RUN state task is the invoking task.<br />

When NULL is designated for regs, eit, or cregs, the corresponding register is not set.<br />

The contents of T REGS, T EIT, and T CREGS are implementation-dependent.<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!