Reference

List of C Language Interface

μT-Kernel/OS

Task Management Functions

  • ID tskid = tk_cre_tsk ( CONST T_CTSK *pk_ctsk );

  • ER ercd = tk_del_tsk ( ID tskid );

  • ER ercd = tk_sta_tsk ( ID tskid, INT stacd );

  • void tk_ext_tsk ( void );

  • void tk_exd_tsk ( void );

  • ER ercd = tk_ter_tsk ( ID tskid );

  • ER ercd = tk_chg_pri ( ID tskid, PRI tskpri );

  • ER ercd = tk_get_reg ( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs );

  • ER ercd = tk_set_reg ( ID tskid, CONST T_REGS *pk_regs, CONST T_EIT *pk_eit, CONST T_CREGS *pk_cregs );

  • ER ercd = tk_get_cpr ( ID tskid, INT copno, T_COPREGS *pk_copregs );

  • ER ercd = tk_set_cpr ( ID tskid, INT copno, CONST T_COPREGS *pk_copregs );

  • ER ercd = tk_ref_tsk ( ID tskid, T_RTSK *pk_rtsk );

Task Synchronization Functions

Task Exception Handling Functions

Synchronization and Communication Functions

  • ID semid = tk_cre_sem ( CONST T_CSEM *pk_csem );

  • ER ercd = tk_del_sem ( ID semid );

  • ER ercd = tk_sig_sem ( ID semid, INT cnt );

  • ER ercd = tk_wai_sem ( ID semid, INT cnt, TMO tmout );

  • ER ercd = tk_wai_sem_u ( ID semid, INT cnt, TMO_U tmout_u );

  • ER ercd = tk_ref_sem ( ID semid, T_RSEM *pk_rsem );

  • ID flgid = tk_cre_flg ( CONST T_CFLG *pk_cflg );

  • ER ercd = tk_del_flg ( ID flgid );

  • ER ercd = tk_set_flg ( ID flgid, UINT setptn );

  • ER ercd = tk_clr_flg ( ID flgid, UINT clrptn );

  • ER ercd = tk_wai_flg ( ID flgid, UINT waiptn, UINT wfmode, UINT *p_flgptn, TMO tmout );

  • ER ercd = tk_wai_flg_u ( ID flgid, UINT waiptn, UINT wfmode, UINT *p_flgptn, TMO_U tmout_u );

  • ER ercd = tk_ref_flg ( ID flgid, T_RFLG *pk_rflg );

  • ID mbxid = tk_cre_mbx ( CONST T_CMBX* pk_cmbx );

  • ER ercd = tk_del_mbx ( ID mbxid );

  • ER ercd = tk_snd_mbx ( ID mbxid, T_MSG *pk_msg );

  • ER ercd = tk_rcv_mbx ( ID mbxid, T_MSG **ppk_msg, TMO tmout );

  • ER ercd = tk_rcv_mbx_u ( ID mbxid, T_MSG **ppk_msg, TMO_U tmout_u );

  • ER ercd = tk_ref_mbx ( ID mbxid, T_RMBX *pk_rmbx );

Extended Synchronization and Communication Functions

Memory Pool Management Functions

  • ID mpfid = tk_cre_mpf ( CONST T_CMPF *pk_cmpf );

  • ER ercd = tk_del_mpf ( ID mpfid );

  • ER ercd = tk_get_mpf ( ID mpfid, void **p_blf, TMO tmout );

  • ER ercd = tk_get_mpf_u ( ID mpfid, void **p_blf, TMO_U tmout_u );

  • ER ercd = tk_rel_mpf ( ID mpfid, void *blf );

  • ER ercd = tk_ref_mpf ( ID mpfid, T_RMPF *pk_rmpf );

  • ID mplid = tk_cre_mpl ( CONST T_CMPL *pk_cmpl );

  • ER ercd = tk_del_mpl ( ID mplid );

  • ER ercd = tk_get_mpl ( ID mplid, SZ blksz, void **p_blk, TMO tmout );

  • ER ercd = tk_get_mpl_u ( ID mplid, SZ blksz, void **p_blk, TMO_U tmout_u );

  • ER ercd = tk_rel_mpl ( ID mplid, void *blk );

  • ER ercd = tk_ref_mpl ( ID mplid, T_RMPL *pk_rmpl );

Time Management Functions

Interrupt Management Functions

System Management Functions

Subsystem Management Functions

  • ER ercd = tk_def_ssy ( ID ssid, CONST T_DSSY *pk_dssy );

  • ER ercd = tk_evt_ssy ( ID ssid, INT evttyp, ID resid, INT info );

  • ER ercd = tk_ref_ssy ( ID ssid, T_RSSY *pk_rssy );

μT-Kernel/SM

System Memory Management Functions

  • void* Kmalloc ( size_t size );

  • void* Kcalloc ( size_t nmemb, size_t size );

  • void* Krealloc ( void *ptr, size_t size );

  • void Kfree ( void *ptr );

Device Management Functions

  • ID dd = tk_opn_dev ( CONST UB *devnm, UINT omode );

  • ER ercd = tk_cls_dev ( ID dd, UINT option );

  • ID reqid = tk_rea_dev ( ID dd, W start, void *buf, SZ size, TMO tmout );

  • ID reqid = tk_rea_dev_du ( ID dd, D start_d, void *buf, SZ size, TMO_U tmout_u );

  • ER ercd = tk_srea_dev ( ID dd, W start, void *buf, SZ size, SZ *asize );

  • ER ercd = tk_srea_dev_d ( ID dd, D start_d, void *buf, SZ size, SZ *asize );

  • ID reqid = tk_wri_dev ( ID dd, W start, CONST void *buf, SZ size, TMO tmout );

  • ID reqid = tk_wri_dev_du ( ID dd, D start_d, CONST void *buf, SZ size, TMO_U tmout_u );

  • ER ercd = tk_swri_dev ( ID dd, W start, CONST void *buf, SZ size, SZ *asize );

  • ER ercd = tk_swri_dev_d ( ID dd, D start_d, CONST void *buf, W size, W *asize );

  • ID creqid = tk_wai_dev ( ID dd, ID reqid, SZ *asize, ER *ioer, TMO tmout );

  • ID creqid = tk_wai_dev_u ( ID dd, ID reqid, SZ *asize, ER *ioer, TMO_U tmout_u );

  • INT dissus = tk_sus_dev ( UINT mode );

  • ID pdevid = tk_get_dev ( ID devid, UB *devnm );

  • ID devid = tk_ref_dev ( CONST UB *devnm, T_RDEV *rdev );

  • ID devid = tk_oref_dev ( ID dd, T_RDEV *rdev );

  • INT remcnt = tk_lst_dev ( T_LDEV *ldev, INT start, INT ndev );

  • INT retcode = tk_evt_dev ( ID devid, INT evttyp, void *evtinf );

  • ID devid = tk_def_dev ( CONST UB *devnm, CONST T_DDEV *ddev, T_IDEV *idev );

  • ER ercd = tk_ref_idv ( T_IDEV *idev );

  • ER ercd = openfn ( IDdevid, UINTomode, void * exinf);

  • ER ercd = closefn ( IDdevid, UINToption, void * exinf);

  • ER ercd = execfn ( T_DEVREQ * devreq, TMOtmout, void * exinf);

  • ER ercd = execfn ( T_DEVREQ_D * devreq_d, TMOtmout, void * exinf);

  • ER ercd = execfn ( T_DEVREQ * devreq, TMO_Utmout_u, void * exinf);

  • ER ercd = execfn ( T_DEVREQ_D * devreq_d, TMO_Utmout_u, void * exinf);

  • INT creqno = waitfn ( T_DEVREQ * devreq, INTnreq, TMOtmout * exinf);

  • INT creqno = waitfn ( T_DEVREQ_D * devreq_d, INTnreq, TMOtmout * exinf);

  • INT creqno = waitfn ( T_DEVREQ * devreq, INTnreq, TMO_Utmout_u * exinf);

  • INT creqno = waitfn ( T_DEVREQ_D * devreq_d, INTnreq, TMO_Utmout_u * exinf);

  • ER ercd = abortfn ( IDtskid, T_DEVRQ * devreq, INTnreq, void * exinf);

  • ER ercd = abortfn ( IDtskid, T_DEVRQ_D * devreq_d, INTnreq, void * exinf);

  • INT retcode = eventfn ( INTevttyp, void * evtinf, void * exinf);

Interrupt Management Functions

I/O Port Access Support Functions

  • void out_b ( INT port, UB data );

  • void out_h ( INT port, UH data );

  • void out_w ( INT port, UW data );

  • void out_d ( INT port, UD data );

  • UB data = in_b ( INT port );

  • UH data = in_h ( INT port );

  • UW data = in_w ( INT port );

  • UD data = in_d ( INT port );

  • void WaitUsec (UW usec);

  • void WaitNsec ( UW nsec );

Power Management Functions

System Configuration Information Management Functions

  • INT ct = tk_get_cfn ( CONST UB *name, W *val, INT max );

  • INT rlen = tk_get_cfs ( CONST UB *name, UB *buf, INT max );

Memory Cache Control Functions

Physical Timer Functions

Utility Functions

  • void SetOBJNAME ( void *exinf, CONST UB *name );

  • ER ercd = CreateLock ( FastLock *lock, CONST UB *name );

  • void DeleteLock ( FastLock *lock );

  • void Lock ( FastLock *lock );

  • void Unlock ( FastLock *lock );

  • ER ercd = CreateMLock ( FastMLock *lock, CONST UB *name );

  • ER ercd = DeleteMLock ( FastMLock *lock );

  • ER ercd = MLock ( FastMLock *lock, INT no );

  • ER ercd = MLockTmo ( FastMLock *lock, INT no, TMO tmout );

  • ER ercd = MLockTmo_u ( FastMLock *lock, INT no, TMO_U tmout_u );

  • ER ercd = MUnlock ( FastMLock *lock, INT no );

μT-Kernel/DS

Kernel Internal State Acquisition Functions

Trace Functions