From 070abf125e052204c4e49f0939a9e8a4539453e9 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 17 May 2010 05:31:00 +0000 Subject: [PATCH] Add reset_schedlock declaration in target.h. This patches improves a couple of previous patches: - one that introduces reset_schedlock, but failed to add a declarationl; - one that was checked in to avoid a compilation failure due to that missing declaration. It also improves the declaration itself to better conform to our coding practices. Same for the comments. 2010-05-17 Joel Brobecker * target.h (reset_schedlock): Add declaration. * infrun.c (reset_schedlock): Add missing void in function profile. * target.c (target_mourn_inferior): Delete local declaration of reset_schedlock. Style-fix in comment. --- gdb/ChangeLog | 7 +++++++ gdb/infrun.c | 5 +++-- gdb/target.c | 3 +-- gdb/target.h | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb272cd..5d35d00 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2010-05-17 Joel Brobecker + + * target.h (reset_schedlock): Add declaration. + * infrun.c (reset_schedlock): Add missing void in function profile. + * target.c (target_mourn_inferior): Delete local declaration of + reset_schedlock. Style-fix in comment. + 2010-05-17 Hui Zhu * target.c (target_mourn_inferior): Extern reset_schedlock. diff --git a/gdb/infrun.c b/gdb/infrun.c index 96da4cb..025ba0a 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1420,10 +1420,11 @@ set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c) } } -/* reset_schedlock -- public */ +/* If SCHEDULER_MODE is on, then set it back to off. Warn the user + about the change. */ void -reset_schedlock () +reset_schedlock (void) { if (scheduler_mode == schedlock_on) { diff --git a/gdb/target.c b/gdb/target.c index cee3582..ebcf51c 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2244,9 +2244,8 @@ void target_mourn_inferior (void) { struct target_ops *t; - extern void reset_schedlock (); - /* Clear schedlock in infrun.c */ + /* Clear schedlock in infrun.c. */ reset_schedlock (); for (t = current_target.beneath; t != NULL; t = t->beneath) diff --git a/gdb/target.h b/gdb/target.h index d4bd007..cd2e82b 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -873,6 +873,8 @@ int target_write_memory_blocks (VEC(memory_write_request_s) *requests, /* From infrun.c. */ +extern void reset_schedlock (void); + extern int inferior_has_forked (ptid_t pid, ptid_t *child_pid); extern int inferior_has_vforked (ptid_t pid, ptid_t *child_pid); -- 2.7.4