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.

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

tk can wup<br />

Cancel Wakeup Task<br />

[C Language Interface]<br />

INT wupcnt = tk_can_wup ( ID tskid ) ;<br />

[Parameters]<br />

ID tskid Task ID<br />

[Return Parameters]<br />

INT wupcnt Number of queued wakeup requests<br />

or Error Code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E OBJ<br />

Normal completion<br />

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

Object does not exist (the task designated in tskid does not exist)<br />

Invalid object state (called for a task in DORMANT state)<br />

[Description]<br />

Passes in the return parameter the wakeup request queuing count (wupcnt) for the task designated in<br />

tskid, at the same time canceling all wakeup requests. That is, this system call clears the wakeup<br />

request queuing count (wupcnt) to 0 for the designated task.<br />

The invoking task can be designated by setting tskid = TSK SELF = 0. Note, however, that when a<br />

system call is issued from a task-independent portion and tskid = TSK SELF = 0 is designated, error<br />

code E ID is returned.<br />

[Additional Notes]<br />

When processing is performed that involves cyclic wakeup of a task, this system call is used to determine<br />

whether the processing was completed within the allotted time. Before processing of a prior wakeup<br />

request is completed and tk slp tsk is called, the task monitoring this calls tk can wup. If wupcnt in<br />

the return parameter is 1 or above, this means the previous wakeup request was not processed within<br />

the allotted time. A processing delay or other measure can then be taken accordingly.<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!