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.

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

tk set cpr<br />

Set Task Coprocessor Registers<br />

[C Language Interface]<br />

ER ercd = tk_set_cpr ( ID tskid, INT copno, T_COPREGS *pk_copregs ) ;<br />

[Parameters]<br />

ID tskid Task ID<br />

INT copno Coprocessor number (0 to 3)<br />

T COPREGS pk copregs Coprocessor registers<br />

[Return Parameters]<br />

ER ercd Error code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E OBJ<br />

E CTX<br />

E PAR<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 (called for the invoking task)<br />

Context error (called from task-independent portion)<br />

Parameter error (copno is invalid or the designated coprocessor does not exist), or the<br />

set register value is invalid (implementation-dependent)<br />

[Description]<br />

Sets the contents of the register designated in copno of the task designated in tskid.<br />

The set register values are not necessarily the values while the task portion is executing. The OS is not<br />

aware of the effects of register value changes. It is possible, however, that some registers or register bits<br />

cannot be changed if the OS does not allow such changes (implementation-dependent).<br />

If this system call is issued for the invoking task, error code E OBJ is returned.<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!