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.

4.1. TASK MANAGEMENT FUNCTIONS 41<br />

tk get tsp<br />

Get Task Space<br />

[C Language Interface]<br />

ER ercd = tk_get_tsp ( ID tskid, T_TSKSPC *pk_tskspc ) ;<br />

[Parameters]<br />

ID tskid Task ID<br />

[Return Parameters]<br />

T TSKSPC tskspc Task space information<br />

ER ercd Error code<br />

typedef struct t_tskspc {<br />

VP uatb; Task space page table address<br />

INT lsid; Task space ID (logical space ID)<br />

} T_TSKSPC;<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<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 />

Parameter error (the return parameter packet address cannot be used)<br />

[Description]<br />

Gets the current task space information for the task designated in tskid.<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 />

The accuracy of T TSKSPC (uatb, lsid) designation is implementation-dependent, but the above definitions<br />

should be followed to the extent possible.<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!