打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
mantis 系统 用的目录
通过观察:E:\LED显示\SourceInsight\mantis-2009-02-14-r2155\src\mos\kernel\linux下
typedef struct thread_s {
   pthread_t pt;
   pthread_cond_t blocker; //used to suspend/resume thread
   pthread_mutex_t blockerMux; //protects blocker
   void (*func)(void);
   uint8_t state;
   uint8_t priority;
   struct thread_s *next;
} mos_thread_t;

和E:\LED显示\SourceInsight\mantis-2009-02-14-r2155\src\mos\kernel\micro下
typedef struct thread_s {
   /** @brief Stack pointer */
   stackval_t *sp; //线程当前的堆栈指针 stackval_t到底是什么类型,有些地方定义memtype_t,memtype_t又是什么类型?
   /** @brief Pointer to stack memory for de-allocating */
   stackval_t *stack; //堆栈基指针
   /** @brief Size of stack (for debugging) */
   uint16_t stackSize; //堆栈的大小
   /** @brief Function pointer to thread's start func */
   void (*func)(void); //指向线程开始函数的指针
   /** @brief Thread sleep time */
   uint32_t st; //线程的睡眠时间
   /** @brief Current thread state */
   uint8_t state; //目前线程的状态
   /** @brief Current thread suspend state */
   uint8_t suspend_state;//当前线程的挂起状态
   /** @brief Thread priority */
   uint8_t priority; //线程的优先级
   /** @brief Port number -- Only used for net recv */
   uint8_t port; //端口号(只用于网络接收)
   /** @brief Next thread on list */
   struct thread_s *next; //指向线程列表中的下一个线程
   struct thread_s *waiting_for;
   uint8_t thread_id;
} mos_thread_t;
应该是用的是:\mantis-2009-02-14-r2155\src\mos\kernel\micro目录的而不是E:\LED显示\SourceInsight\mantis-2009-02-14-r2155\src\mos\kernel\linux下的;
因为中科院的无线传感网络讲义中结构体是上面第二个;
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
嵌入式er:该知道如何计算CPU使用率(附代码)
RT-thread内核原理_rtthread
工作队列分析
内核工作队列(workqueue)
进程池和线程池、协程
RK3399Android11平台上Ambient Light & Proximity Sensor 光感和距离传感器 STK3311X调试记录
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服