NAME ^

stm.ops -- Software transactional memory related ops

DESCRIPTION ^

Operations for software transactional memory. Includes all transaction manipulating flow-control, actual transacted data manipulation occurs through STMRef/STMVar PMCs.

Parrot STM operations ^

stm_start()

Start a new transaction.

stm_validate(in LABEL)

If the current transaction is invalid jump to $1; otherwise, excecution continues normally.

If there is no active transaction, execution continues normally.

stm_commit(inconst LABEL)

Commits the most recently opened transaction. Jumps to $1 if the commit fails. (If the outer transaction is invalid, this should succeed always.)

If stm_commit jumps to $1, then the transaction will have been aborted.

stm_wait(inconst LABEL)

Does what stm_wait does, but if the outer transaction is invalid after waiting or after the inner transaction is aborted, jumps to $1.

(The jump is needed because otherwise the inner transaction may never succeed because the outer transaction constrains it to not see new values.)

stm_abort()

Aborts the most recently opened transaction.

stm_depth(out INT)

Writes the number transactions active in this thread into $1.

COPYRIGHT ^

Copyright 2006-2008, The Perl Foundation.

LICENSE ^

This program is free software. It is subject to the same license as the Parrot interpreter itself.


parrot