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);
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-08-15
  • 2021-12-07
  • 2022-12-23
  • 2021-06-16
猜你喜欢
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-01-06
  • 2021-09-17
  • 2021-11-11
  • 2022-12-23
相关资源
相似解决方案