This page is available in: en

td_ref_cyc, td_ref_alm, td_ref_ssy

Reference Queue

[C Language Interface]

ER ercd =	td_ref_sem	( ID semid, TD_RSEM *rsem );	/* semaphore	*/


ER ercd =	td_ref_flg	( ID flgid, TD_RFLG *rflg );	/* event flag	*/


ER ercd =	td_ref_mbx	( ID mbxid, TD_RMBX *rmbx );	/* mailbox	*/


ER ercd =	td_ref_mtx	( ID mtxid, TD_RMTX *rmtx );	/* mutex	*/


ER ercd =	td_ref_mbf	( ID mbfid, TD_RMBF *rmbf );	/* message buffer	*/


ER ercd =	td_ref_por	( ID porid, TD_RPOR *rpor );	/* rendezvous port	*/


ER ercd =	td_ref_mpf	( ID mpfid, TD_RMPF *rmpf );	/* fixed-size memory	*/


ER ercd =	td_ref_mpl	( ID mplid, TD_RMPL *rmpl );	/* variable-size memo	*/


ER ercd =	td_ref_cyc	( ID cycid, TD_RCYC *rcyc );	/* cyclic handler	*/


ER ercd =	td_ref_alm	( ID almid, TD_RALM *ralm );	/* alarm handler	*/


ER ercd =	td_ref_ssy	( ID ssid, TD_RSSY *rssy );	/* subsystem  pool ry  pool	*/

[Parameters]

ID	--id	Object ID


TD_R--	r--	Address of status information packet

[Return Parameters]

ER	ercd	Error code

[Error Codes]

E_OK	Normal completion


E_ID	Bad identifier


E_NOEXS	Object does not exist

[Description]

Gets the status of an object. This is similar to tk_ref -. The return packets are defined as follows.


/*
*Semaphore status information	td_ref_sem
*/
typedef	struct td_rsem {
	VP	exinf;	/* extended information	*/
	ID	wtsk;	/* waiting task ID	*/
	INT	semcnt;	/* current semaphore count	*/
} TD_RSEM;
/*
*Event flag status information	td_ref_flg
*/
typedef	struct td_rflg {
	VP	exinf;	/* extended information	*/
	ID	wtsk;	/* waiting task ID	*/
	UINT	flgptn;	/* current event flag pattern	*/
} TD_RFLG;
/*
*Mailbox	status information	td_ref_mbx
*/
typedef	struct td_rmbx {
	VP	exinf;	/* extended information	*/
	ID	  wtsk;	/* waiting task ID	*/
	T_MSG	*pk_msg;	/* next message to be received	*/
} TD_RMBX;
/*
*Mutex status information td_ref_mtx
*/
typedef	struct td_rmtx {
	VP	exinf;	/* extended information	*/
	ID	htsk;	/* locking task ID	*/
	ID	wtsk;	/* ID of task waiting for lock */
} TD_RMTX;
/*
* Message buffer status information	td_ref_mbf
*/
typedef	struct td_rmbf {
	VP	exinf;	/* extended information	*/
	ID	wtsk;	/* receive waiting task ID	*/
	ID	stsk;	/* send waiting task ID	*/
	INT	msgsz; 	/* size (in bytes) of next message to be received	*/
	W	frbufsz;	/* free buffer size (in bytes)	*/
	INT	maxmsz;	/* maximum message length (in bytes)	*/
} TD_RMBF;
/*
*Rendezvous port status  information	td_ref_por
*/
typedef	struct td_rpor {
	VP	exinf;	/* extended information	*/
	ID	wtsk;	/* call waiting task ID	*/
	ID	atsk;	/* acceptance waiting task ID	*/
	INT	maxcmsz;	/* call message maximum length (in bytes)	*/
	INT	maxrmsz;	/* accept message maximum length (in bytes)	*/
} TD_RPOR;
/*
*Fixed-size memory pool status information	td_ref_mpf
*/
typedef	struct td_rmpf {
	VP	exinf;	/* extended information	*/
	ID	wtsk;	/* waiting task ID	*/
	W	frbcnt;	/* free block count	*/
} TD_RMPF;
/*
*Variable-size memory pool status information	td_ref_mpl
*/
typedef	struct td_rmpl {
	VP	exinf;	/* extended information	*/
	ID	wtsk;	/* waiting task ID	*/
	W	frsz;	/* total free space (in bytes)	*/
	W	maxsz;	/* maximum contiguous free space (in bytes)	*/
} TD_RMPL;
/*
*Cyclic handler status information	td_ref_cyc
*/
typedef	struct td_rcyc {
	VP	exinf;	/* extended information	*/
	RELTIM	lfttim;	/* time remaining until next handler start	*/
	UINT	cycstat;	/* cyclic handler status	*/
} TD_RCYC;
]
/*
*Alarm handler status information	td_ref_alm
*/
typedef struct td_ralm {
	VP	exinf;	/* extended information	*/
	RELTIM	lfttim;	/* time remaining until next handler start	*/
	UINT	almstat;	/* alarm handler status	*/
} TD_RALM;
/*
*Subsystem status information	td_ref_ssy
*/
typedef	struct td_rssy {
	PRI	ssypri;	/* subsystem priority	*/
	W	resblksz;	/* resource control block size (in bytes)	*/
} TD_RSSY;
[Difference with T-Kernel 1.00.00]

frbufsz, the member of TD_RMBF, is of W type instead of INT type.

frbcnt, the member of TD_RMPF, is of W type instead of INT type.

frsz and maxsz, the members of TD_RMPL, are of W type instead of INT type.

resblksz, the member of TD_RSSY, is of W type instead of INT type.

Comments

Click here to Post a Comment