TinySTM  1.0.5
Functions
mod_log.h File Reference

Module for logging memory accesses. More...

Go to the source code of this file.

Functions

void stm_log (stm_word_t *addr)
 Log word-sized value in transaction log. More...
 
void stm_log_u8 (uint8_t *addr)
 Log char 8-bit value in transaction log. More...
 
void stm_log_u16 (uint16_t *addr)
 Log char 16-bit value in transaction log. More...
 
void stm_log_u32 (uint32_t *addr)
 Log char 32-bit value in transaction log. More...
 
void stm_log_u64 (uint64_t *addr)
 Log char 64-bit value in transaction log. More...
 
void stm_log_char (char *addr)
 Log char value in transaction log. More...
 
void stm_log_uchar (unsigned char *addr)
 Log unsigned char value in transaction log. More...
 
void stm_log_short (short *addr)
 Log short value in transaction log. More...
 
void stm_log_ushort (unsigned short *addr)
 Log unsigned short value in transaction log. More...
 
void stm_log_int (int *addr)
 Log int value in transaction log. More...
 
void stm_log_uint (unsigned int *addr)
 Log unsigned int value in transaction log. More...
 
void stm_log_long (long *addr)
 Log long value in transaction log. More...
 
void stm_log_ulong (unsigned long *addr)
 Log unsigned long value in transaction log. More...
 
void stm_log_float (float *addr)
 Log float value in transaction log. More...
 
void stm_log_double (double *addr)
 Log double value in transaction log. More...
 
void stm_log_ptr (void **addr)
 Log pointer value in transaction log. More...
 
void stm_log_bytes (uint8_t *addr, size_t size)
 Log memory region in transaction log. More...
 
void mod_log_init (void)
 Initialize the module. More...
 

Detailed Description

Module for logging memory accesses.

Data is stored in an undo log. Upon abort, modifications are reverted. Note that this module should not be used for updating shared data as there are no mechanisms to deal with concurrent accesses.

Author
Pascal Felber pasca.nosp@m.l.fe.nosp@m.lber@.nosp@m.unin.nosp@m.e.ch Patrick Marlier patri.nosp@m.ck.m.nosp@m.arlie.nosp@m.r@un.nosp@m.ine.c.nosp@m.h
Date
2007-2014

Function Documentation

void mod_log_init ( void  )

Initialize the module.

This function must be called once, from the main thread, after initializing the STM library and before performing any transactional operation.

void stm_log ( stm_word_t addr)

Log word-sized value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_bytes ( uint8_t *  addr,
size_t  size 
)

Log memory region in transaction log.

Parameters
addrAddress of the memory location.
sizeNumber of bytes to log.
void stm_log_char ( char *  addr)

Log char value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_double ( double *  addr)

Log double value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_float ( float *  addr)

Log float value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_int ( int *  addr)

Log int value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_long ( long *  addr)

Log long value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_ptr ( void **  addr)

Log pointer value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_short ( short *  addr)

Log short value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_u16 ( uint16_t *  addr)

Log char 16-bit value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_u32 ( uint32_t *  addr)

Log char 32-bit value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_u64 ( uint64_t *  addr)

Log char 64-bit value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_u8 ( uint8_t *  addr)

Log char 8-bit value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_uchar ( unsigned char *  addr)

Log unsigned char value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_uint ( unsigned int *  addr)

Log unsigned int value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_ulong ( unsigned long *  addr)

Log unsigned long value in transaction log.

Parameters
addrAddress of the memory location.
void stm_log_ushort ( unsigned short *  addr)

Log unsigned short value in transaction log.

Parameters
addrAddress of the memory location.