Why taskENTER_CRITICAL in some "get" functions in timers.c

For example, uxTimerGetReloadMode, pvTimerGetTimerID, xTimerIsTimerActive, etc. They simply read a certain property of the timer, which I think is atomic. Is it necessary to guard the read in critical section?
Thanks.

-Oscar

In the case of uxTimerGetReloadMode() a test is performed on a value that may change before the return value is set - so although setting the return value is atomic the entire operation isn’t. That said, you could argue this either way as even with the critical section, by the time the return value is actually returned it may be wrong anyway (if a higher priority task happens to change the value of pxTimer->ucStatus between the critical section being exited and the value being returned).

Got it. Richard. Sounds like it is not 100% necessary to have taskENTER_CRITICAL in those functions. There are similar cases in other files, such as queue.c.

Thanks.