提交 a68295d2 编写于 作者: zhushy_'s avatar zhushy_

fix:change queuePosion to queuePosition

上级 12d98b14
...@@ -193,20 +193,20 @@ STATIC VOID OsQueueBufferOperate(LosQueueCB *queueCB, UINT32 operateType, VOID * ...@@ -193,20 +193,20 @@ STATIC VOID OsQueueBufferOperate(LosQueueCB *queueCB, UINT32 operateType, VOID *
{ {
UINT8 *queueNode = NULL; UINT8 *queueNode = NULL;
UINT32 msgDataSize; UINT32 msgDataSize;
UINT16 queuePosion; UINT16 queuequeuePosition;
/* get the queue position */ /* get the queue position */
switch (OS_QUEUE_OPERATE_GET(operateType)) { switch (OS_QUEUE_OPERATE_GET(operateType)) {
case OS_QUEUE_READ_HEAD: case OS_QUEUE_READ_HEAD:
queuePosion = queueCB->queueHead; queuequeuePosition = queueCB->queueHead;
((queueCB->queueHead + 1) == queueCB->queueLen) ? (queueCB->queueHead = 0) : (queueCB->queueHead++); ((queueCB->queueHead + 1) == queueCB->queueLen) ? (queueCB->queueHead = 0) : (queueCB->queueHead++);
break; break;
case OS_QUEUE_WRITE_HEAD: case OS_QUEUE_WRITE_HEAD:
(queueCB->queueHead == 0) ? (queueCB->queueHead = queueCB->queueLen - 1) : (--queueCB->queueHead); (queueCB->queueHead == 0) ? (queueCB->queueHead = queueCB->queueLen - 1) : (--queueCB->queueHead);
queuePosion = queueCB->queueHead; queuequeuePosition = queueCB->queueHead;
break; break;
case OS_QUEUE_WRITE_TAIL: case OS_QUEUE_WRITE_TAIL:
queuePosion = queueCB->queueTail; queuequeuePosition = queueCB->queueTail;
((queueCB->queueTail + 1) == queueCB->queueLen) ? (queueCB->queueTail = 0) : (queueCB->queueTail++); ((queueCB->queueTail + 1) == queueCB->queueLen) ? (queueCB->queueTail = 0) : (queueCB->queueTail++);
break; break;
default: /* read tail, reserved. */ default: /* read tail, reserved. */
...@@ -214,7 +214,7 @@ STATIC VOID OsQueueBufferOperate(LosQueueCB *queueCB, UINT32 operateType, VOID * ...@@ -214,7 +214,7 @@ STATIC VOID OsQueueBufferOperate(LosQueueCB *queueCB, UINT32 operateType, VOID *
return; return;
} }
queueNode = &(queueCB->queueHandle[(queuePosion * (queueCB->queueSize))]); queueNode = &(queueCB->queueHandle[(queuequeuePosition * (queueCB->queueSize))]);
if (OS_QUEUE_IS_READ(operateType)) { if (OS_QUEUE_IS_READ(operateType)) {
if (memcpy_s(&msgDataSize, sizeof(UINT32), queueNode + queueCB->queueSize - sizeof(UINT32), if (memcpy_s(&msgDataSize, sizeof(UINT32), queueNode + queueCB->queueSize - sizeof(UINT32),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册