86 # define STM_VERSION "1.0.5"
90 # define STM_VERSION_NB 105
99 # define _CALLCONV __attribute__((fastcall))
142 unsigned int id : 16;
297 void stm_exit_thread_tx(struct stm_tx *tx) _CALLCONV;
317 sigjmp_buf *stm_start_tx(struct stm_tx *tx,
stm_tx_attr_t attr) _CALLCONV;
331 int stm_commit_tx(struct stm_tx *tx) _CALLCONV;
344 void stm_abort(
int abort_reason) _CALLCONV;
345 void stm_abort_tx(struct stm_tx *tx,
int abort_reason) _CALLCONV;
361 stm_word_t
stm_load(volatile stm_word_t *addr) _CALLCONV;
362 stm_word_t stm_load_tx(struct stm_tx *tx, volatile stm_word_t *addr) _CALLCONV;
377 void stm_store(volatile stm_word_t *addr, stm_word_t value) _CALLCONV;
378 void stm_store_tx(struct stm_tx *tx, volatile stm_word_t *addr, stm_word_t value) _CALLCONV;
397 void stm_store2(volatile stm_word_t *addr, stm_word_t value, stm_word_t mask) _CALLCONV;
398 void stm_store2_tx(struct stm_tx *tx, volatile stm_word_t *addr, stm_word_t value, stm_word_t mask) _CALLCONV;
409 int stm_active_tx(struct stm_tx *tx) _CALLCONV;
420 int stm_aborted_tx(struct stm_tx *tx) _CALLCONV;
433 int stm_irrevocable_tx(struct stm_tx *tx) _CALLCONV;
444 int stm_killed_tx(struct stm_tx *tx) _CALLCONV;
461 sigjmp_buf *stm_get_env_tx(struct stm_tx *tx) _CALLCONV;
474 stm_tx_attr_t stm_get_attributes_tx(struct stm_tx *tx) _CALLCONV;
491 int stm_get_stats_tx(struct stm_tx *tx, const
char *name,
void *val) _CALLCONV;
542 void *stm_get_specific_tx(struct stm_tx *tx,
int key) _CALLCONV;
556 void stm_set_specific_tx(struct stm_tx *tx,
int key,
void *data) _CALLCONV;
581 void (*on_thread_exit)(
void *arg),
582 void (*on_start)(
void *arg),
583 void (*on_precommit)(
void *arg),
584 void (*on_commit)(
void *arg),
585 void (*on_abort)(
void *arg),
586 void *arg) _CALLCONV;
602 stm_word_t
stm_unit_load(volatile stm_word_t *addr, stm_word_t *timestamp) _CALLCONV;
625 int stm_unit_store(volatile stm_word_t *addr, stm_word_t value, stm_word_t *timestamp) _CALLCONV;
652 int stm_unit_store2(volatile stm_word_t *addr, stm_word_t value, stm_word_t mask, stm_word_t *timestamp) _CALLCONV;
670 void stm_set_extension_tx(struct stm_tx *tx,
int enable, stm_word_t *timestamp) _CALLCONV;
697 int stm_set_irrevocable_tx(struct stm_tx *tx,
int serial) _CALLCONV;
703 # error Hybrid is temporary disabled for code refactoring
705 # ifdef EXPLICIT_TX_PARAMETER
706 # define TXTYPE struct stm_tx *
707 # define TXPARAM struct stm_tx *tx
708 # define TXPARAMS struct stm_tx *tx,
709 # define TXARG (struct stm_tx *)tx
710 # define TXARGS (struct stm_tx *)tx,
742 int hytm_commit(TXPARAM);
750 void hytm_abort(TXPARAMS
int abort_reason);
760 stm_word_t hytm_load(TXPARAMS
volatile stm_word_t *addr);
770 void hytm_store(TXPARAMS
volatile stm_word_t *addr, stm_word_t value);
782 void hytm_store2(TXPARAMS
volatile stm_word_t *addr, stm_word_t value, stm_word_t mask);
807 int tm_commit(TXPARAM);
815 void tm_abort(TXPARAMS
int abort_reason);
825 stm_word_t tm_load(TXPARAMS
volatile stm_word_t *addr);
835 void tm_store(TXPARAMS
volatile stm_word_t *addr, stm_word_t value);
847 void tm_store2(TXPARAMS
volatile stm_word_t *addr, stm_word_t value, stm_word_t mask);
855 int tm_hybrid(TXPARAM);
861 void tm_restart_software(TXPARAM);