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

推荐订阅源

月光博客
月光博客
J
Java Code Geeks
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
U
Unit 42
B
Blog
宝玉的分享
宝玉的分享
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
博客园 - Franky
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
博客园 - 叶小钗

博客园 - 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);

}