InterlockedExchange question?

  • Thread starter Thread starter cppBeginnnnnner
  • Start date Start date
C

cppBeginnnnnner

Guest
Hi Guys,


I have two questions, please help

1.If there is only one CPU, thread A and thread B are trying to run the InterlockedExchange.

If Thread A is in the middle of running the InterlockedExchange, and Thread A already exhaust its quantum time, does it yields and allow thread B to run the InterlockedExchange?


2. If there are two CPUs. Thread A runs on CPU0 and Thread B runs on CPU1.

If Thread A is in the middle of InterlockedExchange, and Thread B starts to run InterlockedExchange.

What's the status of thread B, is it in wait state? or just fails?


Thanks for your help.

Continue reading...
 
Back
Top