MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / BlockingCallFromMainThread

Method BlockingCallFromMainThread

rpcs3/Emu/System.cpp:247–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void Emulator::BlockingCallFromMainThread(std::function<void()>&& func, std::source_location src_loc) const
248{
249 atomic_t<u32> wake_up = 0;
250
251 sys_log.trace("Blocking Callback from thread '%s' at [%s] is queued", thread_ctrl::get_name(), src_loc);
252
253 CallFromMainThread(std::move(func), &wake_up, true, umax, src_loc);
254
255 bool logged = false;
256
257 while (!wake_up)
258 {
259 if (!logged && !thread_ctrl::get_current())
260 {
261 logged = true;
262 sys_log.error("Calling thread of BlockingCallFromMainThread is not of named_thread<>, calling from %s", src_loc);
263 }
264
265 wake_up.wait(0);
266 }
267}
268
269// This function ensures constant initialization order between different compilers and builds
270void init_fxo_for_exec(utils::serial* ar, bool full = false)

Callers 13

sceNpBasicSendMessageGuiFunction · 0.80
recv_message_guiFunction · 0.80
open_cameraMethod · 0.80
start_cameraMethod · 0.80
stop_cameraMethod · 0.80
close_cameraMethod · 0.80
on_handler_stateMethod · 0.80
cellOskDialogLoadAsyncFunction · 0.80
throw_fatalFunction · 0.80
on_button_pressedMethod · 0.80
showMethod · 0.80
InitMethod · 0.80

Calls 2

errorMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected