Created
June 8, 2017 01:00
-
-
Save egraldlo/ff456b0fd25d38ac2124a451c82853c1 to your computer and use it in GitHub Desktop.
specific usage of xabort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned status = 0; | |
while(true) | |
{ | |
status = _xbegin(); | |
if(status == _XBEGIN_STARTED) | |
{ | |
//Transaction code | |
bool success = transaction_func(); | |
if(success) | |
{ | |
_xend(); | |
break; | |
} | |
else | |
{ | |
_xabort(0Xff); | |
continue; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment