-1

Is there any windows API (application program interface) to execute thread on atomic mode?

  • 2
    What's "atomic mode"? – conio Apr 28 '16 at 14:09
  • execute operation without context switch – forbiddenhi May 3 '16 at 5:54
  • Obviously Not. That's what preemptive multitasking (in contrast to cooperative multitasking) means. Preemption means the operating system may preempt your thread at any moment (for any reason or for no reason at all as far as you're concerned), and it actually does. – conio May 3 '16 at 8:55
2

The Interlocked API may be what you are looking for. Or more generally, here is the MSDN topic on synchronization.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.