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