1.Queue优化
This commit is contained in:
parent
a3ee79585e
commit
fb4ad35a74
|
@ -99,12 +99,22 @@ SINT32 sf_com_message_app_init(void)
|
|||
}
|
||||
SINT32 sf_com_message_recv_from_app(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
if(sf_msgQueueId == -1)
|
||||
{
|
||||
perror("no init sf_msgQueueId");
|
||||
return 0;
|
||||
}
|
||||
return message_queue_recv(sf_msgQueueId,pMessageBuf);
|
||||
}
|
||||
|
||||
SINT32 sf_com_message_send_to_app(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
pMessageBuf->mtype = 1;
|
||||
if(sf_msgQueueId == -1)
|
||||
{
|
||||
perror("send no init sf_msgQueueId");
|
||||
return -1;
|
||||
}
|
||||
return message_queue_send(sf_msgQueueId,pMessageBuf);
|
||||
}
|
||||
|
||||
|
@ -114,6 +124,11 @@ SINT32 sf_com_message_cardv_init(void)
|
|||
}
|
||||
SINT32 sf_com_message_recv_from_cardv(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||
{
|
||||
if(cardv_msgQueueId == -1)
|
||||
{
|
||||
perror("no init cardv_msgQueueId");
|
||||
return -1;
|
||||
}
|
||||
return message_queue_recv(cardv_msgQueueId,pMessageBuf);
|
||||
}
|
||||
|
||||
|
@ -122,6 +137,11 @@ SINT32 sf_com_message_send_to_cardv(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
pMessageBuf->mtype = 1;
|
||||
//printf("[%s:%d] cmdId = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->cmdId);
|
||||
//sf_system_cardv_wait_done();
|
||||
if(cardv_msgQueueId == -1)
|
||||
{
|
||||
perror("send no init cardv_msgQueueId");
|
||||
return -1;
|
||||
}
|
||||
return message_queue_send(cardv_msgQueueId,pMessageBuf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user