Qualcomm interview question

Write strstr() code. Solutions to avoid race condition?

Qualcomm Interview Question: Write strstr() code. Solutions to avoid race condition? | Glassdoor