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.5. EXTENDED SYNCHRONIZATION AND COMMUNICATION FUNCTIONS 113<br />

If the designated mutex is a priority ceiling mutex and the base priority 2 of the invoking task is higher<br />

than the ceiling priority of the mutex, error code E ILUSE (upper priority limit exceeded) is returned.<br />

[Additional Notes]<br />

Priority inheritance mutex (TA INHERIT attribute)<br />

If the invoking task is waiting to lock a mutex and the current priority of the task currently<br />

locking that mutex is lower than that of the invoking task, the priority of the locking task is<br />

raised to the same level as the invoking task. If the wait ends before the waiting task can obtain<br />

a lock (timeout or other reason), the priority of the task locking that mutex can be lowered<br />

(implementation-dependent option) to the highest of the following three priorities.<br />

a. The highest priority among the current priorities of task waiting to lock the mutex.<br />

b. The highest priority among all the other mutexes locked by the task currently locking this<br />

mutex.<br />

c. The base priority of the locking task.<br />

Priority ceiling mutex (TA CEILING attribute)<br />

If the invoking task obtains a lock and its current priority is lower than the mutex ceiling priority,<br />

the priority of the invoking task is raised to the mutex ceiling priority.<br />

2 Base priority: The task priority before it is automatically raised by the mutex. This is the priority last set by<br />

tk chg pri (including while the mutex is locked), or if tk chg pri has never been issued, the priority set when the task<br />

was created.<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!