最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

ucOS II Potential Issues

业界 admin 3浏览 0评论

构造Free Queue List时pq2指向未知内存

OSQ OSQTbl[OS_MAX_QS];

void OS_QInit(void)
{
......

OSQ *pq1;
OSQ *pq2;

pq1 = &OSQTbl[0];
pq2 = &OSQTbl[1];

for (i = 0; i < (OS_MAX_QS - 1); i++)
{
pq1->OSQPtr = pq2;
pq1++;
pq2++; // pq2 will point to unknown memory
}
}

 

Comments Error

V2.83

os_mutex.c  Line #475.  /* Remove from event wait list */

should be

Add into event wait list

Raise the priority of mutex owner. Add into event wait list if the task is not ready. The old information in wait list has already been removed. (Line #451)

升高mutex owner的prio后,如果not ready,将新prio加入event wait list。原有prio在wait list中已经被清除 (Line #451)

 

转载于:https://wwwblogs/feilian/archive/2012/01/30/2331762.html

构造Free Queue List时pq2指向未知内存

OSQ OSQTbl[OS_MAX_QS];

void OS_QInit(void)
{
......

OSQ *pq1;
OSQ *pq2;

pq1 = &OSQTbl[0];
pq2 = &OSQTbl[1];

for (i = 0; i < (OS_MAX_QS - 1); i++)
{
pq1->OSQPtr = pq2;
pq1++;
pq2++; // pq2 will point to unknown memory
}
}

 

Comments Error

V2.83

os_mutex.c  Line #475.  /* Remove from event wait list */

should be

Add into event wait list

Raise the priority of mutex owner. Add into event wait list if the task is not ready. The old information in wait list has already been removed. (Line #451)

升高mutex owner的prio后,如果not ready,将新prio加入event wait list。原有prio在wait list中已经被清除 (Line #451)

 

转载于:https://wwwblogs/feilian/archive/2012/01/30/2331762.html

发布评论

评论列表 (0)

  1. 暂无评论