Telamon
|
The main structure of the simulator. Contains the operations performed by the simulator. More...
#include <WaitFreeSimulator.hh>
Public Member Functions | |
WaitFreeSimulator (const LockFree &lf) | |
WaitFreeSimulator (LockFree &&lf) | |
auto | run (const Id id, const Input &input, bool use_slow_path=false) -> Output |
Runs the actual simulation. More... | |
auto | try_help_others (const Id id) -> void |
Checks whether other threads need help with a certain operation and tries to help them. | |
The main structure of the simulator. Contains the operations performed by the simulator.
|
inline |
Runs the actual simulation.
input | The given input |
First, the operation is executed as if it was lock-free (the fast-path). If it fails FAST_PATH_RETRY_THRESHOLD number of times or if the contention threshold is reached, the fast-path is abandoned and the operation is switched to the slow-path, which asks the other executing threads for help.