diff options
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index c9436e81..8dd66355 100644 --- a/include/common.h +++ b/include/common.h @@ -99,9 +99,11 @@ u8 *u_stringify_time_diff(u8 *buf, u64 cur_ms, u64 event_ms); /* Wrapper for select() and read(), reading exactly len bytes. Returns the time passed to read. + stop_soon should point to a variable indicating ctrl+c was pressed. If the wait times out, returns timeout_ms + 1; Returns 0 if an error occurred (fd closed, signal, ...); */ -u32 read_timed(s32 fd, void *buf, size_t len, u32 timeout_ms); +u32 read_timed(s32 fd, void *buf, size_t len, u32 timeout_ms, + volatile u8 *stop_soon_p); #endif |