本文整理汇总了C++中KernelObjectPool类的典型用法代码示例。如果您正苦于以下问题:C++ KernelObjectPool类的具体用法?C++ KernelObjectPool怎么用?C++ KernelObjectPool使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了KernelObjectPool类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoState
void KernelObjectPool::DoState(PointerWrap &p)
{
auto s = p.Section("KernelObjectPool", 1);
if (!s)
return;
int _maxCount = maxCount;
p.Do(_maxCount);
if (_maxCount != maxCount)
{
p.SetError(p.ERROR_FAILURE);
ERROR_LOG(SCEKERNEL, "Unable to load state: different kernel object storage.");
return;
}
if (p.mode == p.MODE_READ)
{
hleCurrentThreadName = NULL;
kernelObjects.Clear();
}
p.Do(nextID);
p.DoArray(occupied, maxCount);
for (int i = 0; i < maxCount; ++i)
{
if (!occupied[i])
continue;
int type;
if (p.mode == p.MODE_READ)
{
p.Do(type);
pool[i] = CreateByIDType(type);
// Already logged an error.
if (pool[i] == NULL)
return;
pool[i]->uid = i + handleOffset;
}
else
{
type = pool[i]->GetIDType();
p.Do(type);
}
pool[i]->DoState(p);
if (p.error >= p.ERROR_FAILURE)
break;
}
}
示例2: ERROR_LOG
void KernelObjectPool::DoState(PointerWrap &p)
{
int _maxCount = maxCount;
p.Do(_maxCount);
if (_maxCount != maxCount)
ERROR_LOG(HLE, "Unable to load state: different kernel object storage.");
if (p.mode == p.MODE_READ)
{
hleCurrentThreadName = NULL;
kernelObjects.Clear();
}
p.Do(nextID);
p.DoArray(occupied, maxCount);
for (int i = 0; i < maxCount; ++i)
{
if (!occupied[i])
continue;
int type;
if (p.mode == p.MODE_READ)
{
p.Do(type);
pool[i] = CreateByIDType(type);
pool[i]->uid = i + handleOffset;
// Already logged an error.
if (pool[i] == NULL)
return;
}
else
{
type = pool[i]->GetIDType();
p.Do(type);
}
pool[i]->DoState(p);
}
p.DoMarker("KernelObjectPool");
}
示例3: __KernelShutdown
void __KernelShutdown()
{
if (!kernelRunning)
{
ERROR_LOG(HLE, "Can't shut down kernel - not running");
return;
}
kernelObjects.List();
INFO_LOG(HLE, "Shutting down kernel - %i kernel objects alive", kernelObjects.GetCount());
kernelObjects.Clear();
__MpegShutdown();
__PsmfShutdown();
__PPGeShutdown();
__CtrlShutdown();
__UtilityShutdown();
__GeShutdown();
__SasShutdown();
__DisplayShutdown();
__AudioShutdown();
__IoShutdown();
__KernelMutexShutdown();
__KernelThreadingShutdown();
__KernelMemoryShutdown();
__InterruptsShutdown();
CoreTiming::ClearPendingEvents();
CoreTiming::UnregisterAllEvents();
kernelRunning = false;
}
示例4: __KernelShutdown
void __KernelShutdown()
{
if (!kernelRunning)
{
ERROR_LOG(SCEKERNEL, "Can't shut down kernel - not running");
return;
}
kernelObjects.List();
INFO_LOG(SCEKERNEL, "Shutting down kernel - %i kernel objects alive", kernelObjects.GetCount());
hleCurrentThreadName = NULL;
kernelObjects.Clear();
__AudioCodecShutdown();
__VideoPmpShutdown();
__AACShutdown();
__NetAdhocShutdown();
__NetShutdown();
__FontShutdown();
__Mp3Shutdown();
__MpegShutdown();
__PsmfShutdown();
__PPGeShutdown();
__CtrlShutdown();
__UtilityShutdown();
__GeShutdown();
__SasShutdown();
__DisplayShutdown();
__AtracShutdown();
__AudioShutdown();
__IoShutdown();
__KernelMutexShutdown();
__KernelThreadingShutdown();
__KernelMemoryShutdown();
__InterruptsShutdown();
__CheatShutdown();
__KernelModuleShutdown();
CoreTiming::ClearPendingEvents();
CoreTiming::UnregisterAllEvents();
Reporting::Shutdown();
SaveState::Shutdown();
kernelRunning = false;
}
示例5: __KernelDoState
void __KernelDoState(PointerWrap &p)
{
std::string git_version = PPSSPP_GIT_VERSION;
p.Do(git_version);
if (git_version != PPSSPP_GIT_VERSION)
{
p.SetError(p.ERROR_WARNING);
WARN_LOG(HLE, "Warning: this savestate was generated by a different version of PPSSPP. It may not load properly.");
}
p.Do(kernelRunning);
kernelObjects.DoState(p);
p.DoMarker("KernelObjects");
__InterruptsDoState(p);
// Memory needs to be after kernel objects, which may free kernel memory.
__KernelMemoryDoState(p);
__KernelThreadingDoState(p);
__KernelAlarmDoState(p);
__KernelVTimerDoState(p);
__KernelEventFlagDoState(p);
__KernelMbxDoState(p);
__KernelModuleDoState(p);
__KernelMutexDoState(p);
__KernelSemaDoState(p);
__KernelTimeDoState(p);
__AtracDoState(p);
__AudioDoState(p);
__CtrlDoState(p);
__DisplayDoState(p);
__FontDoState(p);
__GeDoState(p);
__ImposeDoState(p);
__IoDoState(p);
__MpegDoState(p);
__NetDoState(p);
__PowerDoState(p);
__PsmfDoState(p);
__PsmfPlayerDoState(p);
__RtcDoState(p);
__SasDoState(p);
__SslDoState(p);
__UmdDoState(p);
__UtilityDoState(p);
__UsbDoState(p);
__VaudioDoState(p);
__PPGeDoState(p);
__InterruptsDoStateLate(p);
__KernelThreadingDoStateLate(p);
}
示例6: __KernelDoState
void __KernelDoState(PointerWrap &p)
{
p.Do(kernelRunning);
kernelObjects.DoState(p);
p.DoMarker("KernelObjects");
__InterruptsDoState(p);
// Memory needs to be after kernel objects, which may free kernel memory.
__KernelMemoryDoState(p);
__KernelThreadingDoState(p);
__KernelAlarmDoState(p);
__KernelVTimerDoState(p);
__KernelEventFlagDoState(p);
__KernelMbxDoState(p);
__KernelModuleDoState(p);
__KernelMsgPipeDoState(p);
__KernelMutexDoState(p);
__KernelSemaDoState(p);
__KernelTimeDoState(p);
__AtracDoState(p);
__AudioDoState(p);
__CccDoState(p);
__CtrlDoState(p);
__DisplayDoState(p);
__FontDoState(p);
__GeDoState(p);
__ImposeDoState(p);
__IoDoState(p);
__JpegDoState(p);
__MpegDoState(p);
__NetDoState(p);
__PowerDoState(p);
__PsmfDoState(p);
__PsmfPlayerDoState(p);
__RtcDoState(p);
__SasDoState(p);
__SslDoState(p);
__UmdDoState(p);
__UtilityDoState(p);
__UsbDoState(p);
__VaudioDoState(p);
__PPGeDoState(p);
__InterruptsDoStateLate(p);
__KernelThreadingDoStateLate(p);
}
示例7: __KernelDoState
void __KernelDoState(PointerWrap &p)
{
p.Do(kernelRunning);
kernelObjects.DoState(p);
p.DoMarker("KernelObjects");
__InterruptsDoState(p);
__KernelMemoryDoState(p);
__KernelThreadingDoState(p);
__KernelAlarmDoState(p);
__KernelEventFlagDoState(p);
__KernelMbxDoState(p);
__KernelModuleDoState(p);
__KernelMutexDoState(p);
__KernelSemaDoState(p);
__KernelTimeDoState(p);
__AudioDoState(p);
__CtrlDoState(p);
__DisplayDoState(p);
__FontDoState(p);
__GeDoState(p);
__ImposeDoState(p);
__IoDoState(p);
__MpegDoState(p);
__PowerDoState(p);
__PsmfDoState(p);
__PsmfPlayerDoState(p);
__SasDoState(p);
__SslDoState(p);
__UmdDoState(p);
__UtilityDoState(p);
__UsbDoState(p);
__PPGeDoState(p);
__InterruptsDoStateLate(p);
__KernelThreadingDoStateLate(p);
}
示例8: __KernelDoState
void __KernelDoState(PointerWrap &p)
{
{
auto s = p.Section("Kernel", 1, 2);
if (!s)
return;
p.Do(kernelRunning);
kernelObjects.DoState(p);
if (s >= 2)
p.Do(registeredExitCbId);
}
{
auto s = p.Section("Kernel Modules", 1);
if (!s)
return;
__InterruptsDoState(p);
// Memory needs to be after kernel objects, which may free kernel memory.
__KernelMemoryDoState(p);
__KernelThreadingDoState(p);
__KernelAlarmDoState(p);
__KernelVTimerDoState(p);
__KernelEventFlagDoState(p);
__KernelMbxDoState(p);
__KernelModuleDoState(p);
__KernelMsgPipeDoState(p);
__KernelMutexDoState(p);
__KernelSemaDoState(p);
__KernelTimeDoState(p);
}
{
auto s = p.Section("HLE Modules", 1);
if (!s)
return;
__AtracDoState(p);
__AudioDoState(p);
__CccDoState(p);
__CtrlDoState(p);
__DisplayDoState(p);
__FontDoState(p);
__GeDoState(p);
__ImposeDoState(p);
__IoDoState(p);
__JpegDoState(p);
__Mp3DoState(p);
__MpegDoState(p);
__NetDoState(p);
__NetAdhocDoState(p);
__PowerDoState(p);
__PsmfDoState(p);
__PsmfPlayerDoState(p);
__RtcDoState(p);
__SasDoState(p);
__SslDoState(p);
__UmdDoState(p);
__UtilityDoState(p);
__UsbDoState(p);
__VaudioDoState(p);
__HeapDoState(p);
__PPGeDoState(p);
__CheatDoState(p);
}
{
auto s = p.Section("Kernel Cleanup", 1);
if (!s)
return;
__InterruptsDoStateLate(p);
__KernelThreadingDoStateLate(p);
Reporting::DoState(p);
}
}