Hi All,
This is a general question on TI-RTOS. What will happen if two tasks call the same function? Imagine there are two tasks named "taskPriHi" & "taskPriLo". Now let us assume that there is a function named reverseString(char *str). This function will reverse the string. For example, if str is "abc", then after the function returns, str will be "cba". Now say taskPriLo called reverseString with str as "abc", here str is a local variable of taskPriLo. Now, due to some reason taskPriHi is ready to run & so taskPriLo gets blocked (while reverseString called from taskPriLo didn't return). Now taskPriHi also calls reverseSrting function.
Will reverseString() function called from both taskPriHi & taskPriLo return correct results? How are similar situations handled in an RTOS environment in case of calling standard library functions like strlen(), strstr(), etc?
-
Thanks
-
Regards
Soumyajit