MCPcopy Create free account
hub / github.com/cemu-project/Cemu / IOS_RegisterResourceManager

Function IOS_RegisterResourceManager

src/Cafe/IOSU/kernel/iosu_kernel.cpp:334–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332 }
333
334 IOS_ERROR IOS_RegisterResourceManager(const char* devicePath, IOSMsgQueueId msgQueueId)
335 {
336 std::unique_lock _lock(sInternalMutex);
337 if (_IOS_FindResourceManager(devicePath))
338 {
339 cemu_assert_suspicious();
340 return IOS_ERROR_INVALID; // correct error code?
341 }
342
343 // verify if queue is valid
344 IOSMessageQueue* msgQueue;
345 IOS_ERROR r = _IOS_GetMessageQueue(msgQueueId, msgQueue);
346 if (r != IOS_ERROR_OK)
347 return r;
348
349 // create resource manager
350 IOSResourceManager* resourceMgr = _IOS_CreateNewResourceManager(devicePath, msgQueueId);
351 if (!resourceMgr)
352 return IOS_ERROR_MAXIMUM_REACHED;
353
354 return IOS_ERROR_OK;
355 }
356
357 void IOS_DestroyResourceManagerForQueueId(IOSMsgQueueId msgQueueId)
358 {

Callers 5

InitFunction · 0.85
SystemLaunchFunction · 0.85
InitializeFunction · 0.85
ODMServiceThreadFunction · 0.85
ServiceThreadMethod · 0.85

Calls 4

_IOS_FindResourceManagerFunction · 0.85
cemu_assert_suspiciousFunction · 0.85
_IOS_GetMessageQueueFunction · 0.85

Tested by

no test coverage detected