From 534a492f2c0bcceac52a287b03dc1ff5eb0b0763 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 9 Jun 2025 15:03:19 -0500 Subject: Trim more fat, add some doxygen markup to the threadpool functions --- src/shared.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/shared.h') diff --git a/src/shared.h b/src/shared.h index efb95ad..3ff7b2d 100644 --- a/src/shared.h +++ b/src/shared.h @@ -3,11 +3,11 @@ #include -#define STATIC_ARRAY_LEN(arr) (sizeof((arr))/sizeof((arr)[0])) - typedef int (*gcallback)(void*); // Generic callback signature typedef void (*fcallback)(void*); // free()-like callback signature +#define STATIC_ARRAY_LEN(arr) (sizeof((arr))/sizeof((arr)[0])) + #define ERRRET(errval, retval) do {\ errno = (errval);\ return (retval);\ @@ -37,6 +37,7 @@ typedef void (*fcallback)(void*); // free()-like callback signature // Error macro that gcc will not complain about #define ERROR(status, errnum, format, ...) do {error((status), (errnum), (format)__VA_ARGS__); exit((status));} while (0) +// Spit out a warning using `error` #define WARN(errnum, format, ...) do {error(0, (errnum), (format)__VA_ARGS__);} while (0) // Read the entire contents of a file descriptor into a malloc()'ed buffer -- cgit v1.2.3