Electroneum
device_trezor_base.hpp File Reference
#include <cstddef>
#include <string>
#include "device/device.hpp"
#include "device/device_default.hpp"
#include "device/device_cold.hpp"
#include <boost/scope_exit.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include "cryptonote_config.h"
#include "trezor.hpp"
Include dependency graph for device_trezor_base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 hw
 
 hw::trezor
 

Macros

#define TREZOR_AUTO_LOCK_CMD()
 
#define TREZOR_AUTO_LOCK_DEVICE()   boost::lock_guard<boost::recursive_mutex> lock1_device(device_locker)
 

Macro Definition Documentation

◆ TREZOR_AUTO_LOCK_CMD

#define TREZOR_AUTO_LOCK_CMD ( )
Value:
/* lock both mutexes without deadlock*/ \
boost::lock(device_locker, command_locker); \
/* make sure both already-locked mutexes are unlocked at the end of scope */ \
boost::lock_guard<boost::recursive_mutex> lock1(device_locker, boost::adopt_lock); \
boost::lock_guard<boost::mutex> lock2(command_locker, boost::adopt_lock)

Definition at line 50 of file device_trezor_base.hpp.

◆ TREZOR_AUTO_LOCK_DEVICE

#define TREZOR_AUTO_LOCK_DEVICE ( )    boost::lock_guard<boost::recursive_mutex> lock1_device(device_locker)

Definition at line 57 of file device_trezor_base.hpp.