Functions
pthread.h File Reference

Transactional wrappers for interfaces of <pthread.h>. More...

#include <picotm/compiler.h>
#include <picotm/config/picotm-libpthread-config.h>
#include <picotm/picotm-tm.h>
#include <pthread.h>

Functions

static pthread_t load_pthread_t_tx (const pthread_t *addr)
 
static void privatize_pthread_t_tx (const pthread_t *addr, unsigned long flags)
 
PICOTM_NOTHROW int pthread_equal_tx (pthread_t t1, pthread_t t2)
 
PICOTM_NOTHROW pthread_t pthread_self_tx (void)
 
static void store_pthread_t_tx (pthread_t *addr, pthread_t value)
 

Function Documentation

◆ load_pthread_t_tx()

static pthread_t load_pthread_t_tx ( const pthread_t *  addr)
inlinestatic

Loads a value of type ' pthread_t ' with transactional semantics.

Parameters
addrThe source address.
Returns
The transaction-local value loaded from address 'addr'.

◆ privatize_pthread_t_tx()

static void privatize_pthread_t_tx ( const pthread_t *  addr,
unsigned long  flags 
)
inlinestatic

Privatizes a value of type ' pthread_t '.

Parameters
addrThe address to privatize.
flagsPrivatizes for loading and/or storing. Not setting flags discards the buffer.

◆ pthread_equal_tx()

PICOTM_NOTHROW int pthread_equal_tx ( pthread_t  t1,
pthread_t  t2 
)

A transaction-safe implementation of pthread_equal().

◆ pthread_self_tx()

PICOTM_NOTHROW pthread_t pthread_self_tx ( void  )

A transaction-safe implementation of pthread_self().

◆ store_pthread_t_tx()

static void store_pthread_t_tx ( pthread_t *  addr,
pthread_t  value 
)
inlinestatic

Stores a value of type ' pthread_t ' with transactional semantics.

Parameters
addrThe destination address.
valueThe value to store at 'addr'.