From 042e43247f396a9000fead59d9bff87bf12806d6 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 30 Oct 2024 01:51:14 +0100 Subject: Completely revamp the grab source code Some of the (many) few changes are: - Multithreading for significantly faster performance - The -p/--predicate flag - Byte offsets as the default - No customizable colors (maybe this will come back later) - Newer edition of mlib (formerly librune) --- src/tpool.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/tpool.h (limited to 'src/tpool.h') diff --git a/src/tpool.h b/src/tpool.h new file mode 100644 index 0000000..04f0486 --- /dev/null +++ b/src/tpool.h @@ -0,0 +1,19 @@ +#ifndef GRAB_TPOOL_H +#define GRAB_TPOOL_H + +#include +#include +#include + +typedef struct { + int tcnt; + pthread_t *thrds; + atomic_ptrdiff_t wi; + const char **files; + ptrdiff_t filecnt; +} tpool_t; + +int tpinit(tpool_t *tp, const char **files, ptrdiff_t filecnt); +void tpfree(tpool_t *tp); + +#endif /* !GRAB_TPOOL_H */ -- cgit v1.2.3