IBM Z and LinuxONE - Languages

Languages

Languages

Broad range of supported development languages and tools allows to transform software delivery practices.

 View Only

z/OS XL C/C++ built-in functions for transactional memory facilities

By FANG LU posted Tue March 24, 2020 07:39 PM

  

z/OS V1R13 XL C/C++ September 2012 PTF provides compiler built-in function for programmers to access the transactional memory facilities that are shipped with IBM zEnterprise® EC12 (zEC12) hardware.


Transactional memory is a model for controlling concurrent memory accesses in the scope of parallel programming. In this model, you can designate a block of instructions or statements to be treated atomically. Such a block is called a transaction. For parallel programming, a transaction implementation can be tremendously more efficient than other implementation methods. z/OS XL C/C++ built-in functions provide the ability to mark the beginning and end of transactions, and to diagnose the reasons for failure. All the functions and types are defined in builtins.h.


The prototypes of the built-in functions are as follows:

  • long __TM_simple_begin();
  • long __TM_begin(void* const TM_buff);
  • long __TM_end();
  • void __TM_abort();
  • void __TM_named_abort(unsigned char const code);
  • void __TM_abort_assist(unsigned int op1);
  • long __TM_is_user_abort(void* const TM_buff);
  • long __TM_is_named_user_abort(void* const TM_buff, unsigned char* code);
  • long __TM_is_illegal(void* const TM_buff);
  • long __TM_is_footprint_exceeded(void* const TM_buff);
  • long __TM_nesting_depth(void* const TM_buff);
  • long __TM_is_nested_too_deep(void* const TM_buff);
  • long __TM_is_conflict(void* const TM_buff);
  • long __TM_is_failure_persistent(long const result);
  • long __TM_failure_address(void* const TM_buff);
  • long long __TM_failure_code(void* const TM_buff);
  • void __TM_non_transactional_store(void* const addr, long long const value);


You can find details about these hardware built-in functions in z/OS XL C/C++ Programming Guide.

0 comments
0 views

Permalink