mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
Turn target_can_lock_scheduler into a function
This changes the object-like macro target_can_lock_scheduler into an inline function. gdb/ChangeLog 2020-09-28 Tom Tromey <tom@tromey.com> * infrun.c (set_schedlock_func): Update. * target.h (target_can_lock_scheduler): Now a function.
This commit is contained in:
parent
55f6301ac0
commit
8a3ecb79b0
@ -1,3 +1,8 @@
|
||||
2020-09-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* infrun.c (set_schedlock_func): Update.
|
||||
* target.h (target_can_lock_scheduler): Now a function.
|
||||
|
||||
2020-09-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* inferior.h (class inferior) <has_execution>: Update.
|
||||
|
@ -2099,7 +2099,7 @@ show_scheduler_mode (struct ui_file *file, int from_tty,
|
||||
static void
|
||||
set_schedlock_func (const char *args, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
if (!target_can_lock_scheduler)
|
||||
if (!target_can_lock_scheduler ())
|
||||
{
|
||||
scheduler_mode = schedlock_off;
|
||||
error (_("Target '%s' cannot support this command."), target_shortname);
|
||||
|
@ -1837,8 +1837,12 @@ extern bool target_has_execution (inferior *inf = nullptr);
|
||||
/* Can the target support the debugger control of thread execution?
|
||||
Can it lock the thread scheduler? */
|
||||
|
||||
#define target_can_lock_scheduler \
|
||||
(current_top_target ()->get_thread_control_capabilities () & tc_schedlock)
|
||||
static inline bool
|
||||
target_can_lock_scheduler ()
|
||||
{
|
||||
return (current_top_target ()->get_thread_control_capabilities ()
|
||||
& tc_schedlock) != 0;
|
||||
}
|
||||
|
||||
/* Controls whether async mode is permitted. */
|
||||
extern bool target_async_permitted;
|
||||
|
Loading…
Reference in New Issue
Block a user