- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, everyone, I just start to learn RTM programming.
I have some questions about RTM. Take the following code for example(from: http://lwn.net/Articles/533894/), if the lock is not free, then it will execute _xabort, and return abort state 0xff. Will the program go back to execute _xbegin again, and found the _xbegin is no equal to _XBEGIN_STARTED, then it will execute fallback handler. Is my understanding right?
if ((status = _xbegin()) == _XBEGIN_STARTED){ /* Start transaction */ if (lock is free) /* Check lock and put into read-set */ return; /* Execute lock region in transaction */ _xabort(0xff); /* Abort transaction as lock is busy */ }else{ /* fallback handler */ }
Also, I saw two RTM Abort Status Definition in Intel® 64 and IA-32 Architectures Optimization Reference Manual(Table 12-1. RTM Abort Status Definition) and Intel® 64 and IA-32 Architectures Software Developer’s Manual(Table 15-1. RTM Abort Status Definition). It seems that they are different, but I did not quite understand.
I know if the lock is not free, we should set abort status to 0xff. Is that any other situation that abort status will be automatically set to 0xff? How could we distinguish TM region is abort because of lock is not free and other events that cause automatically abort? Also, I found the status return value could be 0 and 8. Is there any different there?
Thanks a lot in advance!
- Tags:
- Parallel Computing
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Questions on these topics seem more likely to get answers on the ISA forum
https://software.intel.com/en-us/forums/intel-isa-extensions
There is also a collection of references
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page