]> git.sur5r.net Git - openocd/commitdiff
reentry assert
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 29 Sep 2009 14:23:42 +0000 (14:23 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 29 Sep 2009 14:23:42 +0000 (14:23 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2770 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/driver.c

index 14ae163e71646d3ad6e959d6692871174cd80c3d..3bce5d5755a183c9f59ca5fa1d94fa1b993a9ae3 100644 (file)
@@ -489,6 +489,11 @@ void interface_jtag_add_callback4(jtag_callback_t callback, jtag_callback_data_t
 
 int interface_jtag_execute_queue(void)
 {
+       static int reentry = 0;
+
+       assert(reentry==0);
+       reentry++;
+
        int retval = default_interface_jtag_execute_queue();
        if (retval == ERROR_OK)
        {
@@ -504,6 +509,8 @@ int interface_jtag_execute_queue(void)
        jtag_command_queue_reset();
        jtag_callback_queue_reset();
 
+       reentry--;
+
        return retval;
 }