From d47f45a5e3e40b48131409071b119b442c78bffc Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Thu, 17 Apr 2025 21:56:23 -0500 Subject: Create ll-internal files to maintain opaqueness of linked list while opening it up for reuse --- src/threadpool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/threadpool.c') diff --git a/src/threadpool.c b/src/threadpool.c index 8f1cf0b..d058d52 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -1,6 +1,9 @@ #include "threadpool.h" #include "shared.h" +#include "ll-internal.h" +#include "ll.h" + #include #include #include @@ -31,7 +34,7 @@ mtxpair * mtxpair_init(void * const data, int type) { // Init the mutex if(mtx_init(mtxp->mtx, type) == thrd_error) { - free(mtxp); free(mtxp->mtx); + free(mtxp->mtx); free(mtxp); RETURNWERR(errno, NULL); } @@ -93,7 +96,7 @@ int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd) // Here's a good reference of this implemented in C++ using Boost: https://gist.github.com/mikeando/482342 typedef struct cq { - + void*placehoilder; } cqueue; typedef struct task { -- cgit v1.2.3