MCPcopy Create free account
hub / github.com/Inori/GPCS4 / registerLibKernel

Function registerLibKernel

GPCS4/Emulator/RegisterModules.cpp:75–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static bool registerLibKernel(CSceModuleSystem* pModuleSystem)
76{
77 bool ret = false;
78 do
79 {
80 if (!pModuleSystem)
81 {
82 break;
83 }
84
85 auto& policyManager = pModuleSystem->getPolicyManager();
86
87 /**
88 * Defines policy for libkernel.
89 *
90 * The default policy for this module is Policy::UseBuitlin,
91 * which means when a sub-library of libkernel is not defined,
92 * it applies the Policy::UseBuiltin policy by default.
93 *
94 * The libc sub-library uses implementations from builtin modules
95 * except the symbols listed below.
96 */
97 policyManager.declareModule("libkernel").withDefault(Policy::UseBuiltin)
98 .declareSubLibrary("libkernel").with(Policy::UseBuiltin).except
99 ({
100 0x581EBA7AFBBC6EC5, // sceKernelGetCompiledSdkVersion
101 0x8E1FBC5E22B82DE1, // sceKernelIsAddressSanitizerEnabled
102 0x0F8CA56B7BF1E2D6, // sceKernelError
103 0x7FBB8EC58F663355, // __stack_chk_guard
104 0x2467D330139D509A, // sceKernelGetFsSandboxRandomWord
105 0xDCFB55EA9DD0357E, // scePthreadEqual
106 });
107
108
109 ret = true;
110 }while(false);
111 return ret;
112}
113
114static bool registerOtherModules(CSceModuleSystem *pModuleSystem)
115{

Callers 1

registerModulesMethod · 0.85

Calls 5

exceptMethod · 0.80
withMethod · 0.80
declareSubLibraryMethod · 0.80
withDefaultMethod · 0.80
declareModuleMethod · 0.80

Tested by

no test coverage detected