NAME ^

src/pmc/stmvar.pmc -- A transactional variable

DESCRIPTION ^

A transactional variable for Parrot's Software Transactional Memory (STM) implementation.

Methods ^

void init()

Initialize the STMVar PMC. Allocates the necessary STM data structures for the PMC and sets the PObj_custom_mark flag.

void init_pmc(value)

Initializes a new STMVar PMC based on PMC value. If value is another STMVar or an STMRef PMC, we simply copy the PMC internals of that PMC into this one. If not, we create a new STM structure based on value and assign that to this PMC.

PMC *clone()

Return the STMVar PMC.

void mark()

Mark data associated with this transactional variable.

get_read

Reads the current STM value of the PMC

get_update

Begin an STM process on this PMC, and return a PMC pointer to the updated data.

set

Writes the value new_value to the PMC, or begins an STM transaction to do that.

freeze

Freeze the PMC into a serial format.

thaw

Thaws the PMC from a serial bytecode format

share_ro

TODO: Document this!

*/

/* * Local variables: * c-file-style: "parrot" * End: * vim: expandtab shiftwidth=4: */


parrot