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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

262 CHAPTER 6. T-KERNEL/DS FUNCTIONS<br />

td sem que, td flg que, td mbx que, td mtx que<br />

td smbf que, td rmbf que, td cal que, td acp que<br />

td mpf que, td mpl que<br />

Reference Queue<br />

[C Language Interface]<br />

INT ct = td_sem_que ( ID semid, ID list[], INT nent ) ; /* semaphore */<br />

INT ct = td_flg_que ( ID flgid, ID list[], INT nent ) ; /* event flag */<br />

INT ct = td_mbx_que ( ID mbxid, ID list[], INT nent ) ; /* mailbox */<br />

INT ct = td_mtx_que ( ID mtxid, ID list[], INT nent ) ; /* mutex */<br />

INT ct = td_smbf_que ( ID mbfid, ID list[], INT nent ) ; /* message buffer send */<br />

INT ct = td_rmbf_que ( ID mbfid, ID list[], INT nent ) ; /* message buffer receive */<br />

INT ct = td_cal_que ( ID porid, ID list[], INT nent ) ; /* rendezvous call */<br />

INT ct = td_acp_que ( ID porid, ID list[], INT nent ) ; /* rendezvous accept */<br />

INT ct = td_mpf_que ( ID mpfid, ID list[], INT nent ) ; /* fixed-size memory pool */<br />

INT ct = td_mpl_que ( ID mplid, ID list[], INT nent ) ; /* variable-size memory pool */<br />

[Parameters]<br />

ID —id Object ID<br />

ID list[] Location of waiting task IDs<br />

INT nent Maximum number of list entries<br />

[Return Parameters]<br />

INT ct Number of waiting tasks<br />

or Error Code<br />

[Error Codes]<br />

E ID<br />

E NOEXS<br />

Bad identifier<br />

Object does not exist<br />

[Description]<br />

Gets a list of IDs of tasks waiting for the object designated in —id.<br />

This function stores in the location designated in list up to nent task IDs, arranged in the order in which<br />

tasks are queued, starting from the first task in the queue. The number of queued tasks is passed in the<br />

return code. If return code > nent, this means not all task IDs could be stored.<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!