|
Monado OpenXR Runtime
|
IPC client thread shutdown and blocking I/O cancellation. More...

Functions | |
| void | ipc_server_client_thread_set_running (struct ipc_server *s, struct ipc_thread *it) |
| Do not revive a starting thread that shutdown has already stopped. | |
| bool | ipc_server_client_thread_is_running (struct ipc_server *s, struct ipc_thread *it) |
| Read the loop state under the same lock used to stop or start it. | |
| void | ipc_server_stop_and_join_client_threads (struct ipc_server *s) |
| Stop and join any remaining per-client threads. | |
IPC client thread shutdown and blocking I/O cancellation.
| bool ipc_server_client_thread_is_running | ( | struct ipc_server * | s, |
| struct ipc_thread * | it | ||
| ) |
Read the loop state under the same lock used to stop or start it.
| void ipc_server_client_thread_set_running | ( | struct ipc_server * | s, |
| struct ipc_thread * | it | ||
| ) |
Do not revive a starting thread that shutdown has already stopped.
| void ipc_server_stop_and_join_client_threads | ( | struct ipc_server * | s | ) |
Stop and join any remaining per-client threads.
Stop all client loops, wake blocking I/O, then join each thread once.
Client threads may still be inside common_shutdown(), which destroys each client's compositor and dereferences s->xsysd / s->xso. Joining them before teardown_all() destroys those resources avoids a race where a client thread locks a mutex that teardown has already freed (observed as an om->initialized assertion in multi_compositor_destroy).
Stop their loops before joining: the epoll based client loop notices STOPPING on its next timeout, while the Windows one is woken by ipc_server_cancel_all_client_io.
Called from shutdown_clients() before the main loop returns, and again from teardown_all() as a fallback.