GDB (xrefs)
|
#include "defs.h"
#include "run-on-main-thread.h"
#include "ser-event.h"
#include <thread>
#include <mutex>
#include "gdbsupport/event-loop.h"
Go to the source code of this file.
Functions | |
static void | run_events (int error, gdb_client_data client_data) |
void | run_on_main_thread (std::function< void()> &&func) |
bool | is_main_thread () |
void | _initialize_run_on_main_thread () |
Variables | |
static struct serial_event * | runnable_event |
static std::vector< std::function< void()> > | runnables |
static std::mutex | runnable_mutex |
static std::thread::id | main_thread |
void _initialize_run_on_main_thread | ( | ) |
Definition at line 111 of file run-on-main-thread.c.
Referenced by initialize_all_files().
bool is_main_thread | ( | ) |
Definition at line 100 of file run-on-main-thread.c.
References main_thread.
Referenced by maybe_quit().
|
static |
Definition at line 51 of file run-on-main-thread.c.
References runnable_event, runnable_mutex, runnables, and serial_event_clear().
void run_on_main_thread | ( | std::function< void()> && | func | ) |
Definition at line 88 of file run-on-main-thread.c.
References func, runnable_event, runnable_mutex, runnables, and serial_event_set().
Referenced by gdb_demangle(), gdbpy_post_event(), and selftests::main_thread_tests::set_done().
|
static |
Definition at line 44 of file run-on-main-thread.c.
Referenced by is_main_thread().
|
static |
Definition at line 30 of file run-on-main-thread.c.
Referenced by run_events(), and run_on_main_thread().
|
static |
Definition at line 40 of file run-on-main-thread.c.
Referenced by run_events(), and run_on_main_thread().
|
static |
Definition at line 34 of file run-on-main-thread.c.
Referenced by run_events(), and run_on_main_thread().