MSGQ_MESSAGE_NOT_AVAILABLE error is received with _msg_alloc function call

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MSGQ_MESSAGE_NOT_AVAILABLE error is received with _msg_alloc function call

1,482 Views
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 Kudos
Reply
3 Replies

1,279 Views
buddingspacer
Contributor I

Can anyone please help us here.

0 Kudos
Reply

1,279 Views
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 Kudos
Reply

1,279 Views
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 Kudos
Reply