No not quite there are some rules.
The task scheduler is cooperative, so a task has to call yield (either explicitly or implicitly through calling into the runtime, or calling wait) to be switched away from.
Similar with GC, you have to perform an allocation or hit a safepoint (which actually could be an issue since every function has a safepoint at the beginning)
And the compiler can’t reorder things that have arbitrary effects. So since errno and the ccall are not “pure” they have to be executed in order and the compiler can’t move things past them.
One potential issue might be interrupts, but that’s also an issue on C afaik.
So immediately really means:
call()
errno()
Any expression in between could cause the issue you are worried about.