惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
V
Visual Studio Blog
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
D
Docker
MyScale Blog
MyScale Blog
小众软件
小众软件
云风的 BLOG
云风的 BLOG
美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】

博客园 - Jeff

4个月 C++ 有限状态机 POJ1019 POJ1035 POJ1007 POJ1005 ONLINE_JUDGE Linux shell定时器 怪异的grep结果 URL2FILE C primer笔记 C语言常用宏定义技巧 分苹果 Socket 为什么选择SMP而不是AMP RTP memory in Vxworks Windriver的项目类型 RTP affinity Symmetric multiprocessing (SMP)
Vxworks增加system call
Jeff · 2011-12-07 · via 博客园 - Jeff

2011-12-07 19:41  Jeff  阅读(1089)  评论(0)    收藏  举报

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

}