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.

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

flgatr:= (TA_TFIFO || TA_TPRI) | (TA_WMUL || TA_WSGL) | [TA_NODISWAI]<br />

TA TFIFO<br />

TA TPRI<br />

TA WSGL<br />

TA WMUL<br />

TA NODISWAI<br />

Tasks are queued in FIFO order<br />

Tasks are queued in priority order<br />

Waiting for multiple tasks is not allowed (Wait Single Task)<br />

Waiting for multiple tasks is allowed (Wait Multiple Task)<br />

Wait disabling by tk dis wai is prohibited<br />

When TA WSGL is designated, multiple tasks cannot be in WAIT state at the same time. Designating<br />

TA WMUL allows waiting by multiple tasks at the same time.<br />

The queuing order of tasks waiting for an event flag can be designated in TA TFIFO or TA TPRI. If the<br />

attribute is TA TFIFO, tasks are ordered by FIFO, whereas TA TPRI designates queuing of tasks in order<br />

of their priority setting.<br />

When TA WSGL is designated, however, since tasks cannot be queued, designation of TA TFIFO or TA TPRI<br />

makes no difference.<br />

When multiple tasks are waiting for an event flag, tasks are checked in order from the head of the queue,<br />

and the wait is released for tasks meeting the conditions. The first task to have its WAIT state released<br />

is therefore not necessarily the first in the queue. If multiple tasks meet the conditions, wait state is<br />

released for each of them.<br />

#define TA_TFIFO 0x00000000 /* manage queue by FIFO */<br />

#define TA_TPRI 0x00000001 /* manage queue by priority */<br />

#define TA_WSGL 0x00000000 /* prohibit multiple task waiting */<br />

#define TA_WMUL 0x00000008 /* allow multiple task waiting */<br />

#define TA_NODISWAI 0x00000080 /* prohibit wait disabling */<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!