Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why users are not allowed to call MEM functions (MEM_alloc, MEM_stat etc) from an HWI or SWI?

allowed functions hwi mem swi Users
0
Posted

Why users are not allowed to call MEM functions (MEM_alloc, MEM_stat etc) from an HWI or SWI?

0

Memory management functions (MEM_alloc(), MEM_stat(), MEM_free()) are blocking calls. This is because the functions require the caller to acquire a lock to the memory before proceeding. In case the MEM functions fail to get a lock to the memory, there is a context switch. A call to a SWI or HWI routine should be non-blocking in nature and hence TI recommends that customer should not call MEM functions inside a SWI or HWI. In case the user makes blocking calls (MEM calls) inside a SWI or HWI, the behavior is not guaranteed. Making any blocking calls from a HWI or SWI can affect the real time response of the system.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.