Vxworks增加system call

Vxworks中增加system call的伪代码.
比如用户层可以获取kernel中的time tick.
#include <syscall.h>
#include <syscallLib.h>
unsigned short gettimdsp( void );
SYSCALL_RTN_TBL_ENTRY msGetTbl[] =
{
{( FUNCPTR ) gettimdsp, 1, "gettimdsp" , 0}
};
unsigned short gettimdsp( void )
{
return timetck ;
}
void usrAppInit ( void )
{
syscallGroupRegister (2, "msgetforrtp" , 2, ( SYSCALL_RTN_TBL_ENTRY *)&msGetTbl, 0);
}

你可能感兴趣的:(Vxworks增加system call)