keep_alive now invokes target_call_timer_callbacks_now
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 8 Sep 2008 07:17:48 +0000 (07:17 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 8 Sep 2008 07:17:48 +0000 (07:17 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@981 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/log.c

index efe5d5bb949ff2bafc816d82fef3f90e4be03cb9..8e3dd70c664a25f84b31cd71dc9a8a02eadb6949 100644 (file)
@@ -358,6 +358,9 @@ char *alloc_printf(const char *format, ...)
  * This function will send a keep alive packet if >500ms has passed since last time
  * it was invoked.
  * 
+ * Note that this function can be invoked often, so it needs to be relatively
+ * fast when invoked more often than every 500ms.
+ * 
  */
 void keep_alive()
 {
@@ -365,18 +368,22 @@ void keep_alive()
        if (current_time-last_time>1000)
        {
                LOG_WARNING("BUG: keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (%lld)", current_time-last_time); 
-               last_time=current_time;
-       } else if (current_time-last_time>500)
+       } 
+       if (current_time-last_time>500)
        {
                /* this will keep the GDB connection alive */
                LOG_USER_N("%s", "");
+
+               /* also process TCL events (we have to do this from 'log.c' since its
+                * keep_alive() is the only routine guaranteed to be called at least
+                * once per second :( */
+               process_jim_events ();
+
+        /* process any timer events now */             
+               target_call_timer_callbacks_now();
+               
                last_time=current_time;
        }
-
-       /* also process TCL events (we have to do this from 'log.c' since its
-        * keep_alive() is the only routine guaranteed to be called at least
-        * once per second :( */
-       process_jim_events ();
 }
 
 /* reset keep alive timer without sending message */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)