The txlib module provides data structures that are safe to use from within transactions and cooperate with the transaction manager. Currently supported are lists, queues, multisets and stacks. More...
Files | |
file | picotm-txlib.h |
Provides transactional data structures. | |
file | picotm-txlist-state.h |
Provides non-transactional state and entries for transactional lists. | |
file | picotm-txlist.h |
Provides transactional lists. | |
file | picotm-txmultiset-state.h |
Provides non-transactional state and entries for transactional multisets. | |
file | picotm-txmultiset.h |
Provides transactional multisets. | |
file | picotm-txqueue-state.h |
Provides non-transactional state and entries for transactional queues. | |
file | picotm-txqueue.h |
Provides transactional queues. | |
file | picotm-txstack-state.h |
Provides non-transactional state and entries for transactional stacks. | |
file | picotm-txstack.h |
Provides transactional stacks. | |
Txlib, the transactional data-structures module, provides data structures that are safe and efficient to use from within transactions. Each data strcuture's implementation cooperates with the transaction manager to provide concurrency control and error recovery.
As a quick example, the following code removes an entry from a source list and appends it to a destination list. The change becomes globally visible during the transaction's successful commit. Concurrent, conflicting access to the list data strcutures is detected and resolved automatically. If the transaction has to roll back at any point, the invoked operation are reverted and the lists return to their previous state.
For more information, refer to the documentation of the specific data structure.