Transactional wrappers for interfaces of <stdlib.h>.
More...
#include <picotm/compiler.h>
#include <picotm/config/picotm-libc-config.h>
#include <picotm/picotm-tm.h>
#include <stdlib.h>
|
PICOTM_NOTHROW PICOTM_NORETURN void | _Exit_tx (int status) |
|
PICOTM_NOTHROW PICOTM_NORETURN void | abort_tx (void) |
|
PICOTM_NOTHROW void * | calloc_tx (size_t nmemb, size_t size) |
|
PICOTM_NOTHROW PICOTM_NORETURN void | exit_tx (int status) |
|
PICOTM_NOTHROW void | free_tx (void *ptr) |
|
static div_t | load_div_t_tx (const div_t *addr) |
|
static ldiv_t | load_ldiv_t_tx (const ldiv_t *addr) |
|
static lldiv_t | load_lldiv_t_tx (const lldiv_t *addr) |
|
static size_t | load_size_t_tx (const size_t *addr) |
|
static wchar_t | load_wchar_t_tx (const wchar_t *addr) |
|
PICOTM_NOTHROW void * | malloc_tx (size_t size) |
|
PICOTM_EXPORT char * | mkdtemp_tx (char *template) |
|
PICOTM_EXPORT int | mkstemp_tx (char *template) |
|
PICOTM_NOTHROW int | posix_memalign_tx (void **memptr, size_t alignment, size_t size) |
|
static void | privatize_div_t_tx (const div_t *addr, unsigned long flags) |
|
static void | privatize_ldiv_t_tx (const ldiv_t *addr, unsigned long flags) |
|
static void | privatize_lldiv_t_tx (const lldiv_t *addr, unsigned long flags) |
|
static void | privatize_size_t_tx (const size_t *addr, unsigned long flags) |
|
static void | privatize_wchar_t_tx (const wchar_t *addr, unsigned long flags) |
|
PICOTM_NOTHROW void | qsort_tx (void *base, size_t nel, size_t width, int(*compar)(const void *, const void *)) |
|
PICOTM_NOTHROW int | rand_r_tx (unsigned int *seed) |
|
PICOTM_NOTHROW void * | realloc_tx (void *ptr, size_t size) |
|
static void | store_div_t_tx (div_t *addr, div_t value) |
|
static void | store_ldiv_t_tx (ldiv_t *addr, ldiv_t value) |
|
static void | store_lldiv_t_tx (lldiv_t *addr, lldiv_t value) |
|
static void | store_size_t_tx (size_t *addr, size_t value) |
|
static void | store_wchar_t_tx (wchar_t *addr, wchar_t value) |
|
◆ _Exit_tx()
A transaction-safe implementation of _Exit().
- Bug:
- Calling _Exit() simply terminates the process. It probably should not be available in a transaction.
◆ abort_tx()
A transaction-safe implementation of abort().
- Bug:
- Calling abort() simply terminates the process. It probably should not be available in a transaction.
◆ calloc_tx()
A transaction-safe implementation of calloc().
◆ exit_tx()
A transaction-safe implementation of exit().
- Bug:
- Calling exit() simply terminates the process. It probably should not be available in a transaction.
◆ free_tx()
A transaction-safe implementation of free().
◆ load_div_t_tx()
static div_t load_div_t_tx |
( |
const div_t * |
addr | ) |
|
|
inlinestatic |
Loads a value of type ' div_t ' with transactional semantics.
- Parameters
-
- Returns
- The transaction-local value loaded from address 'addr'.
◆ load_ldiv_t_tx()
static ldiv_t load_ldiv_t_tx |
( |
const ldiv_t * |
addr | ) |
|
|
inlinestatic |
Loads a value of type ' ldiv_t ' with transactional semantics.
- Parameters
-
- Returns
- The transaction-local value loaded from address 'addr'.
◆ load_lldiv_t_tx()
static lldiv_t load_lldiv_t_tx |
( |
const lldiv_t * |
addr | ) |
|
|
inlinestatic |
Loads a value of type ' lldiv_t ' with transactional semantics.
- Parameters
-
- Returns
- The transaction-local value loaded from address 'addr'.
◆ load_size_t_tx()
static size_t load_size_t_tx |
( |
const size_t * |
addr | ) |
|
|
inlinestatic |
Loads a value of type ' size_t ' with transactional semantics.
- Parameters
-
- Returns
- The transaction-local value loaded from address 'addr'.
◆ load_wchar_t_tx()
static wchar_t load_wchar_t_tx |
( |
const wchar_t * |
addr | ) |
|
|
inlinestatic |
Loads a value of type ' wchar_t ' with transactional semantics.
- Parameters
-
- Returns
- The transaction-local value loaded from address 'addr'.
◆ malloc_tx()
A transaction-safe implementation of malloc().
◆ mkdtemp_tx()
A transaction-safe implementation of mkdtemp().
◆ mkstemp_tx()
A transaction-safe implementation of mkstemp().
◆ posix_memalign_tx()
PICOTM_NOTHROW int posix_memalign_tx |
( |
void ** |
memptr, |
|
|
size_t |
alignment, |
|
|
size_t |
size |
|
) |
| |
◆ privatize_div_t_tx()
static void privatize_div_t_tx |
( |
const div_t * |
addr, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes a value of type ' div_t '.
- Parameters
-
addr | The address to privatize.
|
flags | Privatizes for loading and/or storing. |
◆ privatize_ldiv_t_tx()
static void privatize_ldiv_t_tx |
( |
const ldiv_t * |
addr, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes a value of type ' ldiv_t '.
- Parameters
-
addr | The address to privatize.
|
flags | Privatizes for loading and/or storing. |
◆ privatize_lldiv_t_tx()
static void privatize_lldiv_t_tx |
( |
const lldiv_t * |
addr, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes a value of type ' lldiv_t '.
- Parameters
-
addr | The address to privatize.
|
flags | Privatizes for loading and/or storing. |
◆ privatize_size_t_tx()
static void privatize_size_t_tx |
( |
const size_t * |
addr, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes a value of type ' size_t '.
- Parameters
-
addr | The address to privatize.
|
flags | Privatizes for loading and/or storing. |
◆ privatize_wchar_t_tx()
static void privatize_wchar_t_tx |
( |
const wchar_t * |
addr, |
|
|
unsigned long |
flags |
|
) |
| |
|
inlinestatic |
Privatizes a value of type ' wchar_t '.
- Parameters
-
addr | The address to privatize.
|
flags | Privatizes for loading and/or storing. |
◆ qsort_tx()
PICOTM_NOTHROW void qsort_tx |
( |
void * |
base, |
|
|
size_t |
nel, |
|
|
size_t |
width, |
|
|
int(*)(const void *, const void *) |
compar |
|
) |
| |
A transaction-safe implementation of qsort().
◆ rand_r_tx()
A transaction-safe implementation of rand_r().
◆ realloc_tx()
A transaction-safe implementation of realloc().
◆ store_div_t_tx()
static void store_div_t_tx |
( |
div_t * |
addr, |
|
|
div_t |
value |
|
) |
| |
|
inlinestatic |
Stores a value of type ' div_t ' with transactional semantics.
- Parameters
-
addr | The destination address. |
value | The value to store at 'addr'. |
◆ store_ldiv_t_tx()
static void store_ldiv_t_tx |
( |
ldiv_t * |
addr, |
|
|
ldiv_t |
value |
|
) |
| |
|
inlinestatic |
Stores a value of type ' ldiv_t ' with transactional semantics.
- Parameters
-
addr | The destination address. |
value | The value to store at 'addr'. |
◆ store_lldiv_t_tx()
static void store_lldiv_t_tx |
( |
lldiv_t * |
addr, |
|
|
lldiv_t |
value |
|
) |
| |
|
inlinestatic |
Stores a value of type ' lldiv_t ' with transactional semantics.
- Parameters
-
addr | The destination address. |
value | The value to store at 'addr'. |
◆ store_size_t_tx()
static void store_size_t_tx |
( |
size_t * |
addr, |
|
|
size_t |
value |
|
) |
| |
|
inlinestatic |
Stores a value of type ' size_t ' with transactional semantics.
- Parameters
-
addr | The destination address. |
value | The value to store at 'addr'. |
◆ store_wchar_t_tx()
static void store_wchar_t_tx |
( |
wchar_t * |
addr, |
|
|
wchar_t |
value |
|
) |
| |
|
inlinestatic |
Stores a value of type ' wchar_t ' with transactional semantics.
- Parameters
-
addr | The destination address. |
value | The value to store at 'addr'. |