For example, recently I wanted to call `gettid()` in a signal handler. Which I guessed was just a simple wrapper around the syscall.
However, it seems this can cache the thread ID in thread local storage (can't remember exact details).
I switched to making a syscall instead.