]> git.sur5r.net Git - openocd/commitdiff
More JTAG interface driver cleanup:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 06:33:19 +0000 (06:33 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 06:33:19 +0000 (06:33 +0000)
- Add jtag_callback_queue_reset() to reset the callback queue.
- Make interface_jtag_execute_queue() use new helper function.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1994 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index cc7082de917b3826dda356f07a84a7da75385d73..b1c4dc616406355f3ce49f8ac14b78674ffcc906 100644 (file)
@@ -87,6 +87,12 @@ struct jtag_callback_entry
 
 static struct jtag_callback_entry *jtag_callback_queue_head = NULL;
 static struct jtag_callback_entry *jtag_callback_queue_tail = NULL;
+
+static void jtag_callback_queue_reset(void)
+{
+       jtag_callback_queue_head = NULL;
+       jtag_callback_queue_tail = NULL;
+}
 #endif
 
 
@@ -1583,10 +1589,8 @@ int interface_jtag_execute_queue(void)
                }
        }
 
-       jtag_callback_queue_head = NULL;
-       jtag_callback_queue_tail = NULL;
-
        jtag_command_queue_reset();
+       jtag_callback_queue_reset();
 
        return retval;
 }