前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Shell的Show命令(任务篇)

Shell的Show命令(任务篇)

作者头像
Taishan3721
发布2022-06-30 18:56:50
8240
发布2022-06-30 18:56:50
举报
文章被收录于专栏:这里只有VxWorks这里只有VxWorks

总结一下与Task相关的Show命令

首先是组件INCLUDE_TASK_SHOW - taskShow()

代码语言:javascript
复制
/* display task information from TCBs */
STATUS taskShow
    (
    TASK_ID tid,
    int level /* 0 = summary, 1 = details, 2 = all tasks */
);

/* ti(tid) -> taskShow(tid, 1) */
void ti(long taskNameOrId);

/*
 * i(0) -> taskShow(0, 2)
 * i(tid) -> taskShow(tid, 0)
 */
void i(long taskNameOrId);

大部分Task在大部分时刻的状态都是PEND,那它们pend在什么位置?

代码语言:javascript
复制
/* display information about the object a task is pended on */
STATUS taskWaitShow
    (
    TASK_ID taskId,
    int level /* 0 = summary, 1 = details */
);

/* tw(tid) -> taskWaitShow(tid, 1) */
void tw(long taskNameOrId);

/*
 * w(0) -> taskWaitShow(tid, 0) for all tasks
 * w(tid) -> taskWaitShow(tid, 0)
 */
void w(long taskNameOrId);

如果只看Task的Event使用情况

代码语言:javascript
复制
/* display a task's VxWorks Events information */
STATUS eventTaskShow(TASK_ID tid);

如果Stack溢出了,用checkStack()查看

代码语言:javascript
复制
/* print a summary of each task's stack usage */
void checkStack
    (
    long taskNameOrId /* 0 = summarize all */
);
  • SIZE - Stack size
  • CUR - 当前使用值
  • HIGH - 历史最高使用值
  • MARGIN - 从未使用值,MARGIN = SIZE - HIGH
  • Exception Stack - Vx6为每个Task新引入的异常栈 除了SP与PC,不同Arch上的Task还会使用其它寄存器
代码语言:javascript
复制
/* display the contents of a task's registers */
void taskRegsShow(TASK_ID tid);

还有组件INCLUDE_TASK_HOOKS_SHOW带来的Hook Show

代码语言:javascript
复制
/* show the list of task create routines */
void taskCreateHookShow();
/* show the list of task delete routines */
void taskDeleteHookShow();
/* show the list of task switch routines */
void taskSwitchHookShow();
/* show the list of task swap routines */
void taskSwapHookShow();

也给isrShow()来个链接吧 - INCLUDE_ISR_SHOW

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2022-05-24,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 这里只有VxWorks 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档