daily pastebin goal
79%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. InterlockedExchange fails under vmware, workaround?
  2. volatile __int32 p=0;
  3.    
  4. while(1){
  5.     ExecuteAVeryCPUIntesiveThing();
  6.     InterlockedExchange(&p, 0);
  7. }
  8.    
  9. while(1){
  10.     if(0==InterlockedCompareExchange(&p,0,0))
  11.         InterlockedExchange(&p, 1);
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top