Public interfaces of picotm's Transactional Memory module.
More...
#include <picotm/compiler.h>
#include <picotm/config/picotm-tm-config.h>
#include <stddef.h>
#include <stdint.h>
|
static void * | load_ptr_tx (const void *addr) |
|
static void | load_tx (const void *addr, void *buf, size_t siz) |
|
static void | loadstore_tx (const void *laddr, void *saddr, size_t siz) |
|
static void | privatize_c_tx (const void *addr, int c, unsigned long flags) |
|
static void | privatize_tx (const void *addr, size_t siz, unsigned long flags) |
|
static void | store_ptr_tx (void *addr, const void *ptr) |
|
static void | store_tx (void *addr, const void *buf, size_t siz) |
|
◆ PICOTM_TM_LOAD_TX
#define PICOTM_TM_LOAD_TX |
( |
|
__name, |
|
|
|
__type |
|
) |
| |
Defines a C function for conveniently loading a value of a specific type into a transaction. The helper function's name is load_<__name>_tx.
- Parameters
-
__name | The name of the type. |
__type | The C type. |
◆ PICOTM_TM_PRIVATIZE_LOADSTORE
#define PICOTM_TM_PRIVATIZE_LOADSTORE |
Privatizes a memory region for loading and storing.
◆ PICOTM_TM_PRIVATIZE_TX
#define PICOTM_TM_PRIVATIZE_TX |
( |
|
__name, |
|
|
|
__type |
|
) |
| |
Defines a C function for conveniently privatizing a value of a specific type into a transaction. The helper function's name is store_<__name>_tx.
- Parameters
-
__name | The name of the type. |
__type | The C type. |
◆ PICOTM_TM_STORE_TX
#define PICOTM_TM_STORE_TX |
( |
|
__name, |
|
|
|
__type |
|
) |
| |
Defines a C function for conveniently storing a value of a specific type into a transaction. The helper function's name is store_<__name>_tx.
- Parameters
-
__name | The name of the type. |
__type | The C type. |
◆ anonymous enum
Flags for memory privatizations.
Enumerator |
---|
PICOTM_TM_PRIVATIZE_LOAD | Privatizes a memory region for loading.
|
PICOTM_TM_PRIVATIZE_STORE | Privatizes a memory region for storing.
|
◆ load_ptr_tx()
static void* load_ptr_tx |
( |
const void * |
addr | ) |
|
|
inlinestatic |
Loads a pointer into a buffer.
- Parameters
-
addr | The address to load from. |
- Returns
- The transaction-local pointer.
◆ load_tx()
static void load_tx |
( |
const void * |
addr, |
|
|
void * |
buf, |
|
|
size_t |
siz |
|
) |
| |
|
inlinestatic |
Loads the memory at address into a buffer.
- Parameters
-
addr | The address to load from. |
buf | The transaction-local buffer to store the loaded value in. |
siz | The number of bytes to load. |
◆ loadstore_tx()
static void loadstore_tx |
( |
const void * |
laddr, |
|
|
void * |
saddr, |
|
|
size_t |
siz |
|
) |
| |
|
inlinestatic |
Copies data between non-transactional memory regions.
- Parameters
-
laddr | The address of the source region. |
saddr | The address of the destination region. |
siz | The number of bytes ot copy. |
◆ privatize_c_tx()
static void privatize_c_tx |
( |
const void * |
addr, |
|
|
int |
c, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes the memory region starting at address, ending at character 'c'.
- Parameters
-
addr | The address to privatize. |
c | The region's terminating character. |
flags | Privatizes for loading and/or storing. Not setting flags discards the buffer. |
◆ privatize_tx()
static void privatize_tx |
( |
const void * |
addr, |
|
|
size_t |
siz, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes the memory region starting at address.
- Parameters
-
addr | The address to privatize. |
siz | The number of bytes to privatize. |
flags | Privatizes for loading and/or storing. Not setting flags discards the buffer. |
◆ store_ptr_tx()
static void store_ptr_tx |
( |
void * |
addr, |
|
|
const void * |
ptr |
|
) |
| |
|
inlinestatic |
Stores the pointer in memory.
- Parameters
-
addr | The address to store to. |
ptr | The pointer value to store. |
◆ store_tx()
static void store_tx |
( |
void * |
addr, |
|
|
const void * |
buf, |
|
|
size_t |
siz |
|
) |
| |
|
inlinestatic |
Stores the buffer at address in memory.
- Parameters
-
addr | The address to store to. |
buf | The transaction-local buffer to load the loaded value from. |
siz | The number of bytes to store. |