TinySTM
1.0.5
|
Module for user callbacks. More...
Go to the source code of this file.
Functions | |
int | stm_on_commit (void(*on_commit)(void *arg), void *arg) |
Register an application-specific callback triggered when the current transaction commits. More... | |
int | stm_on_abort (void(*on_abort)(void *arg), void *arg) |
Register an application-specific callback triggered when the current transaction aborts. More... | |
void | mod_cb_init (void) |
Initialize the module. More... | |
Module for user callbacks.
void mod_cb_init | ( | void | ) |
Initialize the module.
This function must be called once, from the main thread, after initializing the STM library and before performing any transactional operation.
int stm_on_abort | ( | void(*)(void *arg) | on_abort, |
void * | arg | ||
) |
Register an application-specific callback triggered when the current transaction aborts.
The callback is automatically unregistered once the transaction commits or aborts. If the transaction commits, the callback is never triggered.
on_abort | Function called upon transaction abort. |
arg | Parameter to be passed to the callback function. |
int stm_on_commit | ( | void(*)(void *arg) | on_commit, |
void * | arg | ||
) |
Register an application-specific callback triggered when the current transaction commits.
The callback is automatically unregistered once the transaction commits or aborts. If the transaction aborts, the callback is never triggered.
on_commit | Function called upon successful transaction commit. |
arg | Parameter to be passed to the callback function. |