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.

270 CHAPTER 6. T-KERNEL/DS FUNCTIONS<br />

td get reg<br />

Get Task Register<br />

[C Language Interface]<br />

ER ercd = td_get_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 />

[Return Parameters]<br />

T REGS pk regs General register<br />

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

T CREGS pk cregs Control register<br />

ER ercd Error code<br />

The contents of T REGS, T EIT, and T CREGS are defined for each CPU and implementation.<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 />

Gets the register values of the task designated in tskid. This is similar to tk get reg.<br />

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

portion 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 referenced.<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!