3 ms·
But if you forget to change it back you may break other invariants, right? Also, what about threads or fibers? I would guess it is thread-local but not fiber-l
by vitiral 4y ago
But if you forget to change it back you may break other invariants, right?
Also, what about threads or fibers? I would guess it is thread-local but not fiber-local?
- tlb 4y agoThat’s true about many cpu registers, but compilers take care of it correctly for everything except floating point flags.
- 323 4y agoIf you're using fibers it's assumed you know what your doing.
- duped 4y agoDepending on the implementation some green threads will save the mxcsr register during context switches (iirc ucontext does this on Linux) but some "fast" context switching libraries will intentionally avoid it to save some cycles since it requires a syscall.