MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / CartScanPause

Method CartScanPause

3ds/source/loader.cpp:721–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719}
720
721TitleCatalog::CartScanPause::CartScanPause(void)
722{
723 TitleCatalog& self = get();
724 self.mCartScanQuiet.store(false);
725 self.mCartScanPaused.fetch_add(1);
726
727 // Wait for the poll to acknowledge, so the pause starts after any
728 // FSUSER_CardSlotIsInserted already in flight has returned. Bounded, not a
729 // handshake: the cart-scan thread may itself be the caller (scanCard ->
730 // TitleProbe), in which case nothing will ever acknowledge and waiting for
731 // one would deadlock.
732 for (int attempt = 0; attempt < 50 && !self.mCartScanQuiet.load(); attempt++) {
733 svcSleepThread(1'000'000);
734 }
735}
736
737TitleCatalog::CartScanPause::~CartScanPause()
738{

Callers

nothing calls this directly

Calls 3

getFunction · 0.85
storeMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected