MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / WaitForOpen

Method WaitForOpen

pcsx2/MTGS.cpp:876–896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874}
875
876bool MTGS::WaitForOpen()
877{
878 if (IsOpen())
879 return true;
880
881 StartThread();
882
883 // request open, and kick the thread.
884 s_open_flag.store(true, std::memory_order_release);
885 s_sem_event.NotifyOfWork();
886
887 // wait for it to finish its stuff
888 s_open_or_close_done.Wait();
889
890 // did we succeed?
891 const bool result = s_open_flag.load(std::memory_order_acquire);
892 if (!result)
893 Console.Error("GS failed to open.");
894
895 return result;
896}
897
898void MTGS::WaitForClose()
899{

Callers

nothing calls this directly

Calls 4

NotifyOfWorkMethod · 0.80
WaitMethod · 0.45
loadMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected