1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 12:42:41 +01:00

Add EAGAIN check for sys_memory_contianer_create

This commit is contained in:
eladash 2019-04-30 09:53:46 +03:00 committed by Nekotekina
parent 1e5e0f3b5e
commit 7508ae6e65
3 changed files with 9 additions and 3 deletions

View File

@ -284,9 +284,14 @@ error_code sys_memory_container_create(vm::ptr<u32> cid, u32 size)
}
// Create the memory container
*cid = idm::make<lv2_memory_container>(size);
if (const u32 id = idm::make<lv2_memory_container>(size))
{
*cid = id;
return CELL_OK;
}
return CELL_OK;
dct->used -= size;
return CELL_EAGAIN;
}
error_code sys_memory_container_destroy(u32 cid)

View File

@ -46,7 +46,7 @@ struct sys_page_attr_t
struct lv2_memory_container
{
static const u32 id_base = 0x1; // Wrong?
static const u32 id_base = 0x3F000000;
static const u32 id_step = 0x1;
static const u32 id_count = 16;

View File

@ -342,6 +342,7 @@ error_code _sys_ppu_thread_create(vm::ptr<u64> thread_id, vm::ptr<ppu_thread_par
if (!tid)
{
vm::dealloc(stack_base);
return CELL_EAGAIN;
}