rlink: simplify and optimize queue fill level checks
commit0b64be20190692c3312e86292d2639dc4a1b1c83
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sat, 16 Jul 2011 23:02:59 +0000 (17 01:02 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 10 Aug 2011 04:52:09 +0000 (10 06:52 +0200)
tree729fa0687b2aed69700e43877cf7ee8fef3d9197
parentd23d61a932c8ff91c087f2ba9396748efda535b7
rlink: simplify and optimize queue fill level checks

Add a helper function for running the queue if it would overflow otherwise.
Use it to simplify the queue fill level checks and optimize in a few cases
that would previously run the queue prematurely.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/jtag/drivers/rlink.c