Is it dangerous to use __asm{} codes in threads?
For example, i have 2 threads running on a single core and main() on another core. What happens if one thread writes on eax and reads ebx while the other reads eax and writes on ebx? What happens if i read these register from main() ?
Each thread has its own set of registers that it maintains. Either because it is running on a different core, or the operating system swaps out the registers on a context switch.