mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
Merge pull request #2299 from popcoder565/test/agc-unit-shadow-import-retire
test(agc-driver): retire the unit shadow block's import before releasing it
This commit is contained in:
@@ -1370,14 +1370,19 @@ void unitShadowTests(const Device& device, Recorder& recorder) {
|
||||
mutation.Add(block, bytes, true, true);
|
||||
}
|
||||
struct Unregister {
|
||||
const Context& context;
|
||||
void* block;
|
||||
std::uint64_t address;
|
||||
bool armed = true;
|
||||
~Unregister() {
|
||||
if (!armed) return;
|
||||
GuestAllocations::Mutation mutation;
|
||||
mutation.Remove(block);
|
||||
{
|
||||
GuestAllocations::Mutation mutation;
|
||||
mutation.Remove(block);
|
||||
}
|
||||
HostImportFor(context, address, bytes);
|
||||
}
|
||||
} unregister{block};
|
||||
} unregister{context, block, address};
|
||||
const auto* import = HostImportFor(context, address, bytes);
|
||||
if (import == nullptr) {
|
||||
std::cout << "host import of the shadow test block refused: unit shadows not tested\n";
|
||||
|
||||
Reference in New Issue
Block a user