MCPcopy Create free account
hub / github.com/devkitPro/libctru / gspExit

Function gspExit

libctru/source/services/gspgpu.c:208–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void gspExit(void)
209{
210 if (AtomicDecrement(&gspRefCount)) return;
211
212 // Stop event handling thread
213 gspRunEvents = false;
214 svcSignalEvent(gspEvent);
215 threadJoin(gspEventThread, U64_MAX);
216
217 // Unmap and close GSP shared memory
218 svcUnmapMemoryBlock(gspSharedMemHandle, (u32)gspSharedMem);
219 svcCloseHandle(gspSharedMemHandle);
220 mappableFree(gspSharedMem);
221
222 // Unregister ourselves
223 GSPGPU_UnregisterInterruptRelayQueue();
224
225 // Release GPU rights and close the service handle
226 GSPGPU_ReleaseRight();
227 svcCloseHandle(gspGpuHandle);
228}
229
230Handle *gspGetSessionHandle(void)
231{

Callers 1

gfxExitFunction · 0.85

Calls 4

threadJoinFunction · 0.85
mappableFreeFunction · 0.85
GSPGPU_ReleaseRightFunction · 0.85

Tested by

no test coverage detected