|parrotcode: Software transactional memory related ops
Contents | Ops
stm.ops -- Software transactional memory related ops
Operations for software transactional memory.
Includes all transaction manipulating flow-control,
actual transacted data manipulation occurs through STMRef/STMVar PMCs.
- Start a new transaction.
- stm_validate(label INT)
- If the current transaction is invalid jump to $1; otherwise,
excecution continues normally.
- If there is no active transaction,
execution continues normally.
- stm_commit(labelconst INT)
- 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(label INT)
- 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.)
- Aborts the most recently opened transaction.
- stm_depth(out INT)
- Writes the number transactions active in this thread into $1.
Copyright 2006 The Perl Foundation.
This program is free software.
It is subject to the same license as the Parrot interpreter itself.