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.

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

tk set rid<br />

Set Task Resource ID<br />

[C Language Interface]<br />

ID oldid = tk_set_rid ( ID tskid, ID resid ) ;<br />

[Parameters]<br />

ID tskid Task ID<br />

ID resid New resource ID<br />

[Return Parameters]<br />

ID oldid Old resource ID<br />

or Error Code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

Normal completion<br />

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

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

[Description]<br />

Changes the current resource group of the task designated in tskid to the resource group designated in<br />

resid. The resource ID of the old resource group before the change is passed in a return parameter.<br />

The invoking task can be designated by setting tskid = TSK SELF = 0. Note, however, that when a<br />

system call is issued from a task-independent portion and tskid = TSK SELF = 0 is designated, error<br />

code E ID is returned.<br />

[Additional Notes]<br />

In some cases error is not returned even if resid was previously deleted. Whether or not an error code<br />

(E NOEXS) is returned is implementation-dependent. In principle it is the responsibility of the caller not<br />

to designate a deleted resource group.<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!