如题,请教一下在bios5下,硬、软件中断线程里 动态申请内存 应如何实现?
bios5中介绍 MEM_alloc等函数 不能在中断线程中调用,且在任务线程中调用需要使用资源锁。此处有两点疑问:
1.MEM_alloc不能再中断中调用的原因是什么?如果是担心被重入,禁用中断后再调用是否可行?
2.(在中断线程不会调用次函数前提下)任务中调用为何非要使用资源锁,MEM_alloc本身又不会产生阻塞?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.