summaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-09-28 19:38:25 -0600
committerTom Tromey <tom@tromey.com>2020-09-28 19:52:21 -0600
commit8a3ecb79b031d578cbdbac5e70784c157ff6387d (patch)
tree111407603d927f6656f00c9e778e62cf7202c20a /gdb/target.h
parent55f6301ac03f8865f486fa2fe8019bd5129f86e3 (diff)
downloadbinutils-gdb-8a3ecb79b031d578cbdbac5e70784c157ff6387d.tar.gz
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.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 20e7ae36ace..9ebb0c3f6d0 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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;