This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Resource free after use

Hi All,

I have a doubt regarding resources freeing in Keil RTX.

There is no API in Keil RTX to destroy the MailQueue, created using osMailCreate() or MessageQueue created using osMessageCreate(). How shall we ensure the resource are freed after use?

The issue we are facing is, we are not able to create again the MailQueue or MessageQueue once created.

Consider an application containing 2 function -initialization function and termination function. In Initialization function, thread and it associated resource are created. In the termination function, we freed the allocated memory, made the Queue ID as NULL and terminated the thread .

Initialization is called on startup and termination on an event in run time. Initialization is called again (after termination) on run time on receiving an event. On second time the initialization fails because we are not able to create the MailQueue or MessageQueue.

Is there any method to free the resource after use? How can i overcome this issue?

Thanks for your support.

Regards
Priya

Parents Reply Children
No data