Pergunta de entrevista da empresa Checkpoint Systems

If two tasks call the same function, what needs to be done to the code first? Conditions: no static variables in the function, only stack variables.

Resposta da entrevista

Sigiloso

15 de out. de 2019

Easy. Nothing, since each task has it's own stack. However, the interviewer said I was wrong, I stood my ground, politely and explained: "each thread or task has its own stack and no shared memory." Was he testing my resolve? Anyway, he was wrong. He was looking for me to use the "reentrant" keyword, hardly even used anymore.