as suggested by Mike. gains about 1% in my test (which for me is about half a second)
Signed-off-by: Frans Meulenbroeks <[email protected]> --- urjtag/src/tap/cable/gpio.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/urjtag/src/tap/cable/gpio.c b/urjtag/src/tap/cable/gpio.c index 2d70946..96b2dee 100644 --- a/urjtag/src/tap/cable/gpio.c +++ b/urjtag/src/tap/cable/gpio.c @@ -133,8 +133,7 @@ static int gpio_get_value (int *fd, unsigned int gpio) ssize_t ret; char value; - lseek(fd, 0, 0); - ret = read(fd, &value, 1); + ret = pread(fd, &value, 1, 0); if (ret != 1) { -- 1.7.0.4 ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
