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.

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

tk ref alm<br />

Reference Alarm Handler Status<br />

[C Language Interface]<br />

ER ercd = tk_ref_alm ( ID almid, T_RALM *pk_ralm ) ;<br />

[Parameters]<br />

ID almid Alarm handler ID<br />

T RALM* pk ralm Address of packet for returning status information<br />

[Return Parameters]<br />

ER ercd Error code<br />

pk ralm detail:<br />

VP exinf Extended information<br />

RELTIM lfttim Time remaining until the handler starts<br />

UINT almstat Alarm handler activation state<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 (almid is invalid or cannot be used)<br />

Object does not exist (the alarm handler designated in almid does not exist)<br />

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

[Description]<br />

References the status of the alarm handler designated in almno, passing in return parameters the time<br />

remaining until the handler starts lfttim, and extended information exinf.<br />

The following information is returned in almstat.<br />

almstat:= (TALM_STP | TALM_STA)<br />

TALM STP<br />

TALM STA<br />

Thg alarm handler is inactive<br />

The alarm handler is active<br />

#define TALM_STP 0x00 /* alarm handler is inactive */<br />

#define TALM_STA 0x01 /* alarm handler is active */<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!