Skip to content

Instantly share code, notes, and snippets.

@ytakano
Created April 10, 2015 10:32
Show Gist options
  • Save ytakano/23a70453c5d2618160fe to your computer and use it in GitHub Desktop.
Save ytakano/23a70453c5d2618160fe to your computer and use it in GitHub Desktop.
Intel TSX RTM
#include <stdio.h>
int main()
{
volatile int i = 0;
while (i < 100000000) {
asm ("xbegin ABORT");
i++;
asm ("xend");
asm ("ABORT:");
}
printf("%d\n", i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment