Migrating applications that use transactional memory built-in functions

Starting from IBM® XL C/C++ for Linux, V13.1.2, to use transactional memory built-in functions, you must include a header file in the source code. In addition, if you used numeric return values of the transaction begin and end built-in functions, you must replace numeric return values with macro return values that are provided by IBM XL C/C++ for Linux, V13.1.6.

New header file needed for transactional memory built-in functions

You must include the htmxlintrin.h file in the source code if you use any of the transactional memory built-in functions.

Changed return values of the transaction begin and end built-in functions

The return values of the transaction begin and end built-in functions are no longer numeric. You must update your program using the following return values:
__TM_begin
This function returns _HTM_TBEGIN_STARTED if successful; otherwise, it returns a different value.
__TM_end
This function returns _HTM_TBEGIN_STARTED if the thread is in the transactional state before the instruction starts; otherwise, it returns a different value.
__TM_simple_begin
This function returns _HTM_TBEGIN_STARTED if successful; otherwise, it returns a different value.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us