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.6. MEMORY POOL MANAGEMENT FUNCTIONS 153<br />

tk rel mpf<br />

Release Fixed-size Memory Block<br />

[C Language Interface]<br />

ER ercd = tk_rel_mpf ( ID mpfid, VP blf ) ;<br />

[Parameters]<br />

ID mpfid Fixed-size memory pool ID<br />

VP blf Memory block start address<br />

[Return Parameters]<br />

ER ercd Error code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E PAR<br />

Normal completion<br />

Invalid ID number (mpfid is invalid or cannot be used)<br />

Object does not exist (the fixed-size memory pool designated in mpfid does not exist)<br />

Parameter error (blf is invalid, or block returned to wrong memory pool)<br />

[Description]<br />

Returns the memory block designated in blf to the fixed-size memory pool designated in mpfid.<br />

Executing tk rel mpf may enable memory block acquisition by another task waiting to allocate memory<br />

from the memory pool designated in mpfid, releasing the WAIT state of that task.<br />

When a memory block is returned to a fixed-size memory pool, it must be the same fixed-size memory<br />

pool from which the block was allocated. If an attempt to return a memory block to a different<br />

memory pool is detected, error code E PAR is returned. Whether this error detection is made or not is<br />

implementation-dependent.<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!