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

os_mut_wait in low level functions

An experienced programmer told me we should not use os_mut_wait in the bottom of a function call tree, e.g:

function A() call B(), B() call C(), C call D(), D() is about sending bytes through UART.

We have multiple tasks call A(), he said we should not put any os_mut_wait in function D(), we should try to put os_mut_wait in A() or A()'s caller, otherwise, it might cause stack overflow if more tasks are paused at D().

Is this right or wrong? Thanks.

0