From fbee13e2f633f0db7c6c9ceeaf4c5d4867baa4f8 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 24 Aug 2021 16:43:29 -0700 Subject: iou: introduce iou_async() for threading This is a preliminary implementaion of an iou-abstracted thread pool. Two callbacks are provided to iou_async(): async_cb: Called by a worker thread and must be carefully written for concurrent execution. completion_cb: Called by iou_run() after a thread has finished with async_cb(). As completion_cb() is called in the iou_run() context, assuming the caller is always entering iou_run() from the main thread, it may be viewed as a continuation point for the async work reentering the serial execution flow. At this time every iou_new() will create two worker threads. In the future it may just create a thread per core or something like that. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cfe6dca..db389ef 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,6 @@ AC_INIT([libiou], [0.1], [vcaputo@pengaru.com]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_CONFIG_MACRO_DIRS([m4]) AC_PROG_CC AM_PROG_CC_C_O AM_PROG_AR @@ -8,6 +9,11 @@ AM_SILENT_RULES([yes]) CFLAGS="$CFLAGS -Wall" +AX_PTHREAD +LIBS="$PTHREAD_LIBS $LIBS" +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +CC="$PTHREAD_CC" + dnl Check for liburing PKG_CHECK_MODULES(URING, liburing) CFLAGS="$CFLAGS $URING_CFLAGS" -- cgit v1.2.3