Fix sys_process_exit2 when SPUs are at av handler

This commit is contained in:
eladash 2019-03-13 12:12:25 +02:00 committed by Ivan
parent 1ed2055ec1
commit a3f65084df
3 changed files with 45 additions and 5 deletions

View file

@ -903,10 +903,8 @@ namespace vm
return nullptr;
}
std::shared_ptr<block_t> map(u32 addr, u32 size, u64 flags)
static std::shared_ptr<block_t> _map(u32 addr, u32 size, u64 flags)
{
vm::writer_lock lock(0);
if (!size || (size | addr) % 4096)
{
fmt::throw_exception("Invalid arguments (addr=0x%x, size=0x%x)" HERE, addr, size);
@ -932,6 +930,13 @@ namespace vm
return block;
}
std::shared_ptr<block_t> map(u32 addr, u32 size, u64 flags)
{
vm::writer_lock lock(0);
return _map(addr, size, flags);
}
std::shared_ptr<block_t> find_map(u32 orig_size, u32 align, u64 flags)
{
vm::writer_lock lock(0);
@ -1030,6 +1035,12 @@ namespace vm
}
}
if (area_size)
{
lock.upgrade();
return _map(addr, area_size, 0x200);
}
return nullptr;
}