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.3. TASK EXCEPTION HANDLING FUNCTIONS 71<br />

void texhdr( INT texcd )<br />

{<br />

/*<br />

Task exception handling<br />

*/<br />

}<br />

/* Task exception handler termination */<br />

if ( texcd == 0 ) {<br />

tk_ext_tsk() or tk_exd_tsk();<br />

} else {<br />

tk_end_tex();<br />

return or longjmp();<br />

}<br />

A task exception handler behaves only like a TA ASM attribute object and cannot be called via a high-level<br />

language support routine. The entry part of the task exception handler must be written in assembly<br />

language. The OS vendor must provide the assembly language source of the entry routine for calling<br />

the above C language task exception handler. That is, source code equivalent to a high-level language<br />

support routine must be provided.<br />

A task set to protection level TA RNG0 when it is created cannot use task exceptions.<br />

[Additional Notes]<br />

At the time a task is created, no task exception handler is defined and task exceptions are disabled.<br />

When a task reverts to DORMANT state, the task exception handler definition is canceled and task<br />

exceptions are disabled. Pending task exceptions are cleared. It is possible, however, to define a task<br />

exception handler for a task in DORMANT state.<br />

Task exceptions are software interrupts raised by tk ras tex, with no direct relation to CPU exceptions.<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!