9 #include <boost/lambda/lambda.hpp>
22 std::lock_guard<std::mutex> lock(
mutex);
28 std::lock_guard<std::mutex> lock(
mutex);
31 for(
auto& barSizesInByte : barSizesInBytes) {
33 auto nwords = (barSizesInByte.second +
sizeof(int32_t) - 1) /
sizeof(int32_t);
39 std::lock_guard<std::mutex> lock(
mutex);
45 std::lock_guard<std::mutex> lock(
mutex);
51 std::lock_guard<std::mutex> lock(
mutex);
55 unsigned int wordBaseIndex = address /
sizeof(int32_t);
56 TRY_REGISTER_ACCESS(
for(
unsigned int wordIndex = 0; wordIndex < sizeInBytes /
sizeof(int32_t);
57 ++wordIndex) { data[wordIndex] =
_barContents[bar].at(wordBaseIndex + wordIndex); });
63 std::lock_guard<std::mutex> lock(
mutex);
67 uint64_t wordBaseIndex = address /
sizeof(int32_t);
68 TRY_REGISTER_ACCESS(
for(
unsigned int wordIndex = 0; wordIndex < sizeInBytes /
sizeof(int32_t); ++wordIndex) {
69 if(
isReadOnly(bar, address + wordIndex *
sizeof(int32_t))) {
72 _barContents[bar].at(wordBaseIndex + wordIndex) = data[wordIndex];
81 std::stringstream info;
82 info <<
"DummyBackend";
87 for(
size_t i = 0; i < sizeInWords; ++i) {
101 AddressRange addressRange, boost::function<
void(
void)>
const& writeCallbackFunction) {
103 std::pair<
AddressRange, boost::function<
void(
void)>>(addressRange, writeCallbackFunction));
107 std::list<boost::function<void(
void)>> callbackFunctionsForThisRange =
109 for(
auto&
function : callbackFunctionsForThisRange) {
128 std::list<boost::function<void(
void)>> returnList;
129 for(
auto callbackIter = startIterator; callbackIter != endIterator; ++callbackIter) {
131 returnList.push_back(callbackIter->second);
139 if(firstRange.
bar != secondRange.
bar) {
143 uint64_t startAddress = std::max(firstRange.
offset, secondRange.
offset);
144 uint64_t endAddress =
149 for(uint64_t address = startAddress; address < endAddress; address +=
sizeof(int32_t)) {
162 std::string address, std::map<std::string, std::string> parameters) {
163 if(parameters[
"map"].empty()) {
183 return {shared_from_this(), module, register_name};
187 auto asyncDomain = boost::dynamic_pointer_cast<async::DomainImpl<std::nullptr_t>>(
191 return asyncDomain->distribute(
nullptr);