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.

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

A task runs either at the protection level set in TA RNGn or at protection level 0. For example, a task<br />

for which TA RNG3 is designated in no case runs at protection level 1 or 2.<br />

In a system with separate interrupt stack, interrupt handlers also use the system stack. An interrupt<br />

handler runs at protection level 0.<br />

The system stack default size is decided taking into account the amount taken up by system call execution<br />

and, in a system with separate interrupt stack, the amount used by interrupt handlers.<br />

The system stack is system space resident memory used at protection level 0. If TA USERSTACK is not<br />

designated, the user stack is system space resident memory used at the protection level designated in the<br />

TA RNGn attribute. If TA USERSTACK is designated, the user stack memory attributes are as designated<br />

by the caller of this system call. Task space may be made nonresident memory. The definition of<br />

TA COPn is dependent on the CPU and other hardware and is not portable. TA FPU is provided as a<br />

portable designation method only for the definition in TA COPn of a floating point processor. If, for<br />

example, the floating point processor is TA COP0, then TA FPU = TA COP0. If there is no particular need<br />

to designate use of a coprocessor for floating point operations, TA FPU = 0 is set.<br />

Even in a system without an MMU, for the sake of portability all attributes including TA RNGn must be<br />

accepted. It is possible, for example, to handle all TA RNGn designations as equivalent to TA RNG0, but<br />

error must not be returned. In the case of TA USERSTACK and TA TASKSPACE, however, E NOSPT may be<br />

returned, since there are many cases where these cannot be supported without an MMU.<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!