]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Introduce run_on_main_thread
authorTom Tromey <tom@tromey.com>
Fri, 8 Mar 2019 22:51:06 +0000 (15:51 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 1 Oct 2019 02:30:39 +0000 (20:30 -0600)
commit0e0174f4d56e034b9ad0ff76040f862bc81b5ff0
tree56c1f51213748383d192e1369dcf6cb6df92e875
parent7e3ed550beaf5dba6b32586c8986c0bc79b959b6
Introduce run_on_main_thread

This introduces a way for a callback to be run on the main thread.

gdb/ChangeLog
2019-09-30  Tom Tromey  <tom@tromey.com>

* unittests/main-thread-selftests.c: New file.
* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
main-thread-selftests.c.
* ser-event.h (run_on_main_thread): Declare.
* ser-event.c (runnable_event, runnables, runnable_mutex): New
globals.
(run_events, run_on_main_thread, _initialize_ser_event): New
functions.
gdb/ChangeLog
gdb/Makefile.in
gdb/ser-event.c
gdb/ser-event.h
gdb/unittests/main-thread-selftests.c [new file with mode: 0644]