|
Monado OpenXR Runtime
|
All in one helper that handles locking, waiting for change and starting a thread. More...
#include <os/os_threading.h>

Static Public Member Functions | |
| static int | os_thread_helper_init (struct os_thread_helper *oth) |
| Initialize the thread helper. More... | |
| static int | os_thread_helper_start (struct os_thread_helper *oth, os_run_func_t func, void *ptr) |
| Start the internal thread. More... | |
| static int | os_thread_helper_signal_stop (struct os_thread_helper *oth) |
| Signal from within the thread that we are stopping. More... | |
| static int | os_thread_helper_stop_and_wait (struct os_thread_helper *oth) |
| Stop the thread and wait for it to exit. More... | |
| static void | os_thread_helper_destroy (struct os_thread_helper *oth) |
| Destroy the thread helper, externally synchronizable. More... | |
| static void | os_thread_helper_lock (struct os_thread_helper *oth) |
| Lock the helper. More... | |
| static void | os_thread_helper_unlock (struct os_thread_helper *oth) |
| Unlock the helper. More... | |
| static bool | os_thread_helper_is_running (struct os_thread_helper *oth) |
| Is the thread running, or supposed to be running. More... | |
| static bool | os_thread_helper_is_running_locked (struct os_thread_helper *oth) |
| Is the thread running, or supposed to be running. More... | |
| static void | os_thread_helper_wait_locked (struct os_thread_helper *oth) |
| Wait for a signal. More... | |
| static void | os_thread_helper_signal_locked (struct os_thread_helper *oth) |
| Signal a waiting thread to wake up. More... | |
| static void | os_thread_helper_name (struct os_thread_helper *oth, const char *name) |
| Make a best effort to name our thread. More... | |
Data Fields | |
| pthread_t | thread |
| pthread_mutex_t | mutex |
| pthread_cond_t | cond |
| bool | initialized |
| bool | running |
All in one helper that handles locking, waiting for change and starting a thread.