Picotm is a system-level transaction manager. It provides transactional semantics for low-level and operating-system functionality. It’s flexible and extensible to cover exactly your requirements. Error handling and thread isolation are provided by picotm, all you have to implement is the application logic.
Picotm is implemented in plain C and is well-suited for implementing applications and firmware that is secure, reliable and thread-safe; yet easy to develop. This makes picotm well-suited for multi-threaded and fault-tolerant software.
Picotm is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Table of Contents
Writing Applications with picotm
- The picotm Programming Interface
This section provides information for users of picotm. It explains the concept of transactions and how to run a transaction with picotm.
- The Transactional Memory Module
The Transactional Memory module provides transactional semantics when accessing main memory. You can load and store variables in main memory, or adopt memory regions into a transactions.
- The Type-Casting Module
The type-casting module provides safe casting between C types. Overflows or underflows in the destination type's range are reported as errors to the transaction.
- The Arithmetic Module
The arithmetic module provides safe arithmetics for C types. Overflows or underflows in the type's range are reported as errors to the transaction.
- The Transactional Data-Structures Module
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.
- The C Standard Library Module
Covers the C Standard Library module. This module offers many features of the C Standard Library and POSIX standard, such as string and memory functions, memory allocation, and file-descriptor I/O.
- The C Math Library Module
Covers the C Math Library module. This module provides transactional C math functions, such sqrt()
or pow()
.
- The POSIX Threads module.
Covers the POSIX Threads interface.
Extending picotm
- The Module Interface
Picotm is extensible. This section explains the module interface and how to implement your own module on top.
- The Module Helper Library
Different modules often share a number of fundamental requirements and concepts. Picotm comes with a large number of data structures and functions for modules to re-use. This includes locks, tree maps, arrays, reference-counting and more.
- The Pointer-Data Module
The pointer-data module associates data items with arbitrary memory locations. The data can be stored globally or local to the thread.