Navigation
API > API/Runtime > API/Runtime/AutoRTFM
AutoRTFM is designed to make it easy to take existing C++ codeeven if it was never designed to have any transactional semanticsand make it transactional just by using an alternate compiler. For details, see `Engine/Source/Runtime/AutoRTFM/Documentation/README.md_. The C API exists for a few reasons:
- It makes linking easy. AutoRTFM has to deal with a weird kind of linking where the compiler directly emits calls to functions with a given name. It's easiest to do that in llvm if the functions have C linkage and C ABI.
- It makes testing easy. Even seemingly simple C++ code introduces pitfalls for AutoRTFM. So very focused tests work best when written in C.
- It makes compiler optimizations much easier as there is no mangling to consider when looking for functions in the runtime we can optimize.
We use snake_case for C API surface area to make it easy to distinguish.
The C API should not be used directly - it is here purely as an implementation detail.
| Name | autortfm_result |
| Type | enum |
| Header File | /Engine/Source/Runtime/AutoRTFM/Public/AutoRTFM.h |
| Include Path | #include "AutoRTFM.h" |
Syntax
enum autortfm_result
{
autortfm_aborted_by_request = 0,
autortfm_aborted_by_language,
autortfm_committed,
autortfm_aborted_by_transact_during_commit,
autortfm_aborted_by_transact_during_abort,
autortfm_aborted_by_cascade,
}
Values
| Name | Remarks |
|---|---|
| autortfm_aborted_by_request | |
| autortfm_aborted_by_language | |
| autortfm_committed | |
| autortfm_aborted_by_transact_during_commit | |
| autortfm_aborted_by_transact_during_abort | |
| autortfm_aborted_by_cascade |