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.4. SYNCHRONIZATION AND COMMUNICATION FUNCTIONS 95<br />

tk ref flg<br />

Reference Event Flag Status<br />

[C Language Interface]<br />

ER ercd = tk_ref_flg ( ID flgid, T_RFLG *pk_rflg ) ;<br />

[Parameters]<br />

ID flgid Event flag ID<br />

T RFLG* pk rflg Address of packet for returning status information<br />

[Return Parameters]<br />

ER ercd Error code<br />

pk rflg detail:<br />

VP exinf Extended information<br />

ID wtsk Waiting task information<br />

UINT flgptn Event flag bit pattern<br />

(Other implementation-dependent parameters may be added beyond this point.)<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E PAR<br />

Normal completion<br />

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

Object does not exist (the event flag designated in flgid does not exist)<br />

Parameter error (the return parameter packet address cannot be used)<br />

[Description]<br />

References the status of the event flag designated in flgid, passing in the return parameters the current<br />

flag pattern (flgptn), waiting task information (wtsk), and extended information (exinf).<br />

wtsk returns the ID of a task waiting for this event flag. If more than one task is waiting (only when<br />

the TA WMUL was designated), the ID of the first task in the queue is returned. If there are no waiting<br />

tasks, wtsk = 0 is returned. If the designated event flag does not exist, error code E NOEXS is returned.<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!