fix:change queuePosion to queuePosition
This commit is contained in:
parent
12d98b144b
commit
a68295d2a9
|
@ -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 *
|
||||||
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),
|
||||||
|
|
Loading…
Reference in New Issue