ck_pr_rtm3
Restricted transactional memory
Usage
unsigned int
void
void
bool
Library
Concurrency Kit (libck, -lck)
Overview
These family of functions implement support for restricted transactional memory, if available on the underlying platform. Currently, support is only provided for Intel Haswell and newer x86 microarchitectures that have the TSX-NI feature.
The ck_pr_rtm_begin() function returns CK_PR_RTM_STARTED if a transaction was successfully started. In case of an abort, either internal (through a ck_pr_rtm_abort) or external, program flow will return to the point which the function was called except the return value will consist of a bitmap with one or more of the following bits set:
- CK_PR_RTM_EXPLICIT
-
Set if the transactionally was explicitly aborted through
ck_pr_rtm_abort(). - CK_PR_RTM_RETRY
-
Set if the transaction failed but can still succeed if retried.
- CK_PR_RTM_CONFLICT
-
The transaction failed due to a conflict in one of the memory addresses that are part of the working set of the transaction.
- CK_PR_RTM_CAPACITY
-
Set if the architecture-defined transaction size limit was exceeded.
- CK_PR_RTM_DEBUG
-
Set if a hardware breakpoint was triggered.
- CK_PR_RTM_NESTED
-
Set if a nested transaction failed.
The user is also able to specify a one byte abort status by calling ck_pr_rtm_abort(). This status byte can be extracted by calling the CK_PR_RTM_CODE() function with the return value of ck_pr_rtm_begin() as an argument. The return value of CK_PR_RTM_CODE() will be the value of this status byte. For additional information, please see the Intel instruction set manuals.
History
- Debian 13 (Trixie) to Debian 9 (Stretch): the text shown here
- Debian 8 (Jessie)