mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
psv_object_list_t template concept
This commit is contained in:
parent
9d6dc46812
commit
9350476263
8 changed files with 165 additions and 1 deletions
|
|
@ -1,12 +1,14 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/ARMv7/PSVFuncList.h"
|
||||
#include "Emu/ARMv7/PSVObjectList.h"
|
||||
|
||||
#include "Emu/CPU/CPUThreadManager.h"
|
||||
#include "Emu/SysCalls/Callback.h"
|
||||
#include "Emu/ARMv7/ARMv7Thread.h"
|
||||
|
||||
#include "sceLibKernel.h"
|
||||
#include "psv_sema_object.h"
|
||||
|
||||
#define RETURN_ERROR(code) { Emu.Pause(); sceLibKernel.Error("%s() failed: %s", __FUNCTION__, #code); return code; }
|
||||
|
||||
|
|
@ -450,7 +452,18 @@ 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);
|
||||
|
||||
throw __FUNCTION__;
|
||||
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;
|
||||
|
||||
const s32 id = g_psv_sema_list.add(sema);
|
||||
|
||||
sceLibKernel.Error("*** semaphore created -> id=0x%x", id);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
s32 sceKernelDeleteSema(s32 semaId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue