summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-02 06:33:19 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-02 06:33:19 +0000
commitc10d4d9a00e4074ce52524d5feace1fd0a4bce11 (patch)
tree4ff40e27c37b1423cb521b0f3621cce43d35820a
parente733ac36bf52283ff70fa352447fd85d41580e49 (diff)
downloadopenocd+libswd-c10d4d9a00e4074ce52524d5feace1fd0a4bce11.tar.gz
openocd+libswd-c10d4d9a00e4074ce52524d5feace1fd0a4bce11.tar.bz2
openocd+libswd-c10d4d9a00e4074ce52524d5feace1fd0a4bce11.tar.xz
openocd+libswd-c10d4d9a00e4074ce52524d5feace1fd0a4bce11.zip
More JTAG interface driver cleanup:
- 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
-rw-r--r--src/jtag/jtag.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index cc7082de..b1c4dc61 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -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;
}