MSGQ_MESSAGE_NOT_AVAILABLE error is received with _msg_alloc function call

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MSGQ_MESSAGE_NOT_AVAILABLE error is received with _msg_alloc function call

1,756 次查看
buddingspacer
Contributor I

with MQX ,

 

MSGQ_MESSAGE_NOT_AVAILABLE  error is being  received with msg_alloc function call,

But its not listed in the standard task error codes for the _msg_alloc or the _mem_alloc_system function calls.

 

Please enlighten us here

 

0 项奖励
回复
3 回复数

1,553 次查看
buddingspacer
Contributor I

Can anyone please help us here.

0 项奖励
回复

1,553 次查看
PetrL
NXP Employee
NXP Employee

Hi,

 

I checked the _msg_alloc function implementation (C:\Freescale\Freescale MQX 3.8\mqx\source\message\ms_alloc.c) and it does not set this error anywhere in code.

 

Can you check if the task error is not set already before calling _msg_alloc? The mentioned error is set only by _msgq_open_system, _msgq_peek, _msgq_poll and _msgq_recieve_xxx functions as described in MQX Reference manual.

 

Regards,

PetrL

0 项奖励
回复

1,553 次查看
buddingspacer
Contributor I

Thanks PetrL...

Yea, the MSGQ_MESSAGE_NOT_AVAILABLE  is set even before the call to msg_alloc.Seems that is set with the mssq_receive() call.

 

But the question is can msg_alloc return, NULL even without setting a error code?

0 项奖励
回复