CK_PR_RTM(3)
β¨ CK_PR_RTM β restricted transactional memory, bestie edition β¨
okay so welcome to ck_pr_rtm(3), the page about ck_pr_rtm_begin, ck_pr_rtm_end, ck_pr_rtm_abort and ck_pr_rtm_test β aka the restricted transactional memory girlies π
β¨
π LIBRARY
Concurrency Kit (libck, -lck) π«Ά
π SYNOPSIS
#include <ck_pr.h>
unsigned int
ck_pr_rtm_begin(void);
void
ck_pr_rtm_end(void);
void
ck_pr_rtm_abort(const unsigned int status);
bool
ck_pr_rtm_test(void);
like. look at her. so clean. πΈ
π DESCRIPTION
okay so this whole little family of functions implements support for restricted transactional memory, if it's actually available on the underlying platform you're on. and rn? support is only provided for Intel Haswell and newer x86 microarchitectures that have the TSX-NI feature. so if you're on something else, no transaction for you bestie π
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 throughck_pr_rtm_abort().CK_PR_RTM_RETRYβ Set if the transaction failed but can still succeed if retried. (retry era π)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. it's giving drama between threads ngl π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. π
π SEE ALSO
ck_pr_fence_load(3), ck_pr_fence_load_depends(3), ck_pr_fence_store(3), ck_pr_fence_memory(3), ck_pr_load(3), ck_pr_store(3), ck_pr_fas(3), ck_pr_faa(3), ck_pr_inc(3), ck_pr_dec(3), ck_pr_neg(3), ck_pr_not(3), ck_pr_sub(3), ck_pr_and(3), ck_pr_or(3), ck_pr_xor(3), ck_pr_add(3), ck_pr_btc(3), ck_pr_bts(3), ck_pr_btr(3)
Additional information available at http://concurrencykit.org/ π
fr fr if you're not on Haswell or newer with TSX-NI, none of this is happening, no cap. check your platform before you commit to the transactional lifestyle bestie π
mwah π that's the whole page β ck_pr_rtm(3), dated December 17, 2013, straight out of the Concurrency Kit collection. slay, stay transactional, and don't forget to read the Intel manuals iykyk πβ¨
π¦ where this page comes from
- alpine 3.24: ck-doc 0.7.2-r1 Β· BSD-2-Clause AND Apache-2.0
- debian bookworm: libck-dev 0.7.1-10 Β· BSD-2-Clause
- debian trixie: libck-dev 0.7.2-6 Β· BSD-2-Clause
- epel 10: ck-devel 0.7.2-1.el10_1 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- epel 9: ck-devel 0.7.0-10.el9 Β· BSD
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- nixos 26.05: ck 0.7.2
- nixpkgs unstable: ck 0.7.2
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- ubuntu jammy: libck-dev 0.7.1-6ubuntu2 Β· BSD-2-Clause
- ubuntu noble: libck-dev 0.7.1-13build1 Β· BSD-2-Clause
- ubuntu questing: libck-dev 0.7.2-5ubuntu1
- ubuntu resolute: libck-dev 0.7.2-5ubuntu2 Β· BSD-2-Clause
- ubuntu stonking: libck-dev 0.7.2-11 Β· BSD-2-Clause
- Copyright 2013 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms