openocd/src
Tim Newsome db16b3dc5b Call poll at a fixed interval.
The existing implementation blocks in select() for a fixed amount of
time. This change tracks when the next event (likely poll()) wants to be
run, and uses a shorter timeout in select() if necessary.

Also track all these timeouts using milliseconds as returned by
timeval_ms() instead of `struct timeval` to simplify the code.

This feature is helpful if poll() wants to do something like sample PCs
or memory values for basically the entire time that otherwise OpenOCD
would be hung in select(). See
https://github.com/riscv/riscv-openocd/pull/541 for an example of that.
The RISC-V code using this change will be upstreamed some day, too.

Signed-off-by: Tim Newsome <tim@sifive.com>
Change-Id: I67104a7cf69ed07c8399c14aa55963fc5116a67d
Reviewed-on: http://openocd.zylin.com/6363
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2021-07-31 10:08:47 +01:00
..
flash openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
helper openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
jtag drivers/cmsis-dap: update for newest protocol version 2021-07-31 10:08:24 +01:00
pld openocd: fix simple cases of NULL comparison 2021-07-24 10:37:49 +01:00
rtos openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
rtt openocd: fix doxygen parameters of functions 2021-01-13 11:33:53 +00:00
server Call poll at a fixed interval. 2021-07-31 10:08:47 +01:00
svf openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
target Call poll at a fixed interval. 2021-07-31 10:08:47 +01:00
transport openocd: remove NULL comparisons with checkpatch [1/2] 2021-07-24 10:38:00 +01:00
xsvf openocd: fix simple cases of NULL comparison 2021-07-24 10:37:49 +01:00
Makefile.am build: Fix out-of-tree with --disable-dependency-tracking configure flag 2021-04-05 23:24:14 +01:00
hello.c openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
openocd.c openocd: remove NULL comparisons with checkpatch [2/2] 2021-07-24 10:38:11 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00