I have been asked this question in an interview and I thought to take advice from you guys.
Say I have a pre-compiled library which references to some function say "strtok".
There is no source code for this library.
$ nm lib.a | grep strtok U _strtok
Your target system uses a RTOS and you have multiple threads which make calls into the library.
Q) Why might this be a problem?
To my understanding, this shouldn't be a problem . I mean there is nothing wrong in calling same function from different threads. If you want to ensure that your variables are consistent it is advisable to provide thread synchronization mechanisms to prevent crashes and race conditions