scePerf stub, sceSysmodule, sema, ef

This commit is contained in:
Nekotekina 2015-01-27 03:19:51 +03:00
parent a7d85480a8
commit 81340e9d5c
19 changed files with 310 additions and 87 deletions

View file

@ -8,7 +8,8 @@
#include "Emu/ARMv7/ARMv7Thread.h"
#include "sceLibKernel.h"
#include "psv_sema_object.h"
#include "psv_sema.h"
#include "psv_event_flag.h"
#define RETURN_ERROR(code) { Emu.Pause(); sceLibKernel.Error("%s() failed: %s", __FUNCTION__, #code); return code; }
@ -393,7 +394,13 @@ s32 sceKernelWaitMultipleEventsCB(vm::psv::ptr<SceKernelWaitEvent> pWaitEventLis
s32 sceKernelCreateEventFlag(vm::psv::ptr<const char> pName, u32 attr, u32 initPattern, vm::psv::ptr<const SceKernelEventFlagOptParam> pOptParam)
{
throw __FUNCTION__;
sceLibKernel.Error("sceKernelCreateEventFlag(pName=0x%x, attr=0x%x, initPattern=0x%x, pOptParam=0x%x)", pName, attr, initPattern, pOptParam);
std::shared_ptr<psv_event_flag_t> ef(new psv_event_flag_t(pName.get_ptr(), attr, initPattern));
const s32 id = g_psv_ef_list.add(ef);
return id;
}
s32 sceKernelDeleteEventFlag(s32 evfId)
@ -452,17 +459,10 @@ s32 sceKernelCreateSema(vm::psv::ptr<const char> pName, u32 attr, s32 initCount,
{
sceLibKernel.Error("sceKernelCreateSema(pName=0x%x, attr=0x%x, initCount=%d, maxCount=%d, pOptParam=0x%x)", pName, attr, initCount, maxCount, pOptParam);
std::shared_ptr<psv_sema_t> sema(new psv_sema_t);
strcpy_trunc(sema->name, pName.get_ptr());
sema->attr = attr;
sema->initCount = initCount;
sema->maxCount = maxCount;
std::shared_ptr<psv_sema_t> sema(new psv_sema_t(pName.get_ptr(), attr, initCount, maxCount));
const s32 id = g_psv_sema_list.add(sema);
sceLibKernel.Error("*** semaphore created -> id=0x%x", id);
return id;
}