Files | Functions
The POSIX Threads module.

Covers the POSIX Threads interface. More...


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


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)

Detailed Description

There's currently only minimal support for POSIX threads. Most of the POSIX threads interface's functionality requires irrevocability and is probably not useful for transactional code.

There are currently two supported interface. Call pthread_self_tx() to get a reference to the thread's structure, and use pthread_equal_tx() to compare thread structure with each other.

Function Documentation

◆ load_pthread_t_tx()

static pthread_t load_pthread_t_tx ( const pthread_t *  addr)

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

addrThe source address.
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 

Privatizes a value of type ' pthread_t '.

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 

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

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