It's easier to remember when you understand what the term means.
The term "re-entrant" means that it is safe to "re-enter" the function while it is already executed, typically in a concurrent environment.
In other words, when two tasks can execute the function at the same time without interfering with each other, then the function is re-entrant.
A function is not re-entrant when the execution by one task has an impact on the influence of another task. This typically is the case when a global state or data is used. A function that uses only local variables and arguments is typically re-entrant.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…