X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Ftarget.c;h=5542b33543144281959f6acf708d0761e2adf4c4;hb=68c598e88d5e09728ea845a81ab279c615bbaf0f;hp=695f827a01f07feca6accb51ee8f05893edd6724;hpb=0ae7f962f8145e194f13267359f022ebdc8179dc;p=openocd.git diff --git a/src/target/target.c b/src/target/target.c index 695f827a01..5542b33543 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2,12 +2,15 @@ * Copyright (C) 2005 by Dominic Rath * * Dominic.Rath@gmx.de * * * - * Copyright (C) 2007,2008 Øyvind Harboe * + * Copyright (C) 2007,2008 Øyvind Harboe * * oyvind.harboe@zylin.com * * * * Copyright (C) 2008, Duane Ellis * * openocd@duaneeellis.com * * * + * Copyright (C) 2008 by Spencer Oliver * + * spen@spen-soft.co.uk * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -430,6 +433,10 @@ static int NEW_target_process_reset(struct command_context_s *cmd_ctx, enum targ sprintf( buf, "ocd_process_reset %s", n->name ); Jim_Eval( interp, buf ); + + /* We want any events to be processed before the prompt */ + target_call_timer_callbacks_now(); + return ERROR_OK; } @@ -812,6 +819,8 @@ static int target_call_timer_callbacks_check_time(int checktime) target_timer_callback_t *next_callback; struct timeval now; + keep_alive(); + gettimeofday(&now, NULL); while (callback) @@ -856,7 +865,7 @@ int target_call_timer_callbacks(void) /* invoke periodic callbacks immediately */ int target_call_timer_callbacks_now(void) { - return target_call_timer_callbacks(); + return target_call_timer_callbacks_check_time(0); } int target_alloc_working_area(struct target_s *target, u32 size, working_area_t **area) @@ -4077,12 +4086,3 @@ jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv ) return JIM_ERR; } - - - -/* - * Local Variables: *** - * c-basic-offset: 4 *** - * tab-width: 4 *** - * End: *** - */