17#ifndef __ROGUE_INTERFACES_MEMORY_TRANSACTION_LOCK_H__
18#define __ROGUE_INTERFACES_MEMORY_TRANSACTION_LOCK_H__
41 std::shared_ptr<rogue::interfaces::memory::Transaction> tran_;
58 static std::shared_ptr<rogue::interfaces::memory::TransactionLock>
create(
59 std::shared_ptr<rogue::interfaces::memory::Transaction> transaction);
70 explicit TransactionLock(std::shared_ptr<rogue::interfaces::memory::Transaction> transaction);
110 void exit(
void*,
void*,
void*);
Scoped lock wrapper for a memory transaction.
static std::shared_ptr< rogue::interfaces::memory::TransactionLock > create(std::shared_ptr< rogue::interfaces::memory::Transaction > transaction)
Creates a transaction lock wrapper.
void unlock()
Unlocks the associated transaction when currently locked.
void lock()
Locks the associated transaction when not already locked.
void enter()
Python context-manager entry hook.
~TransactionLock()
Destroys the wrapper and releases any held lock.
static void setup_python()
Registers this type with Python bindings.
void exit(void *, void *, void *)
Python context-manager exit hook.
std::shared_ptr< rogue::interfaces::memory::TransactionLock > TransactionLockPtr
Shared pointer alias for TransactionLock.