Telamon
Public Member Functions | List of all members
telamon_simulator::telamon_private::WaitFreeSimulator< LockFree, N > Class Template Reference

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.
 

Detailed Description

template<NormalizedRepresentation LockFree, const int N = 16>
class telamon_simulator::telamon_private::WaitFreeSimulator< LockFree, N >

The main structure of the simulator. Contains the operations performed by the simulator.

Member Function Documentation

◆ run()

template<NormalizedRepresentation LockFree, const int N = 16>
auto telamon_simulator::telamon_private::WaitFreeSimulator< LockFree, N >::run ( const Id  id,
const Input &  input,
bool  use_slow_path = false 
) -> Output
inline

Runs the actual simulation.

Parameters
inputThe 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.

Returns
The output of the operation

The documentation for this class was generated from the following file: