diff options
Diffstat (limited to 'src/threadpool.c')
| -rw-r--r-- | src/threadpool.c | 7 |
1 files changed, 5 insertions, 2 deletions
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 @@ | |||
| 1 | #include "threadpool.h" | 1 | #include "threadpool.h" |
| 2 | #include "shared.h" | 2 | #include "shared.h" |
| 3 | 3 | ||
| 4 | #include "ll-internal.h" | ||
| 5 | #include "ll.h" | ||
| 6 | |||
| 4 | #include <threads.h> | 7 | #include <threads.h> |
| 5 | #include <stdlib.h> | 8 | #include <stdlib.h> |
| 6 | #include <errno.h> | 9 | #include <errno.h> |
| @@ -31,7 +34,7 @@ mtxpair * mtxpair_init(void * const data, int type) { | |||
| 31 | 34 | ||
| 32 | // Init the mutex | 35 | // Init the mutex |
| 33 | if(mtx_init(mtxp->mtx, type) == thrd_error) { | 36 | if(mtx_init(mtxp->mtx, type) == thrd_error) { |
| 34 | free(mtxp); free(mtxp->mtx); | 37 | free(mtxp->mtx); free(mtxp); |
| 35 | RETURNWERR(errno, NULL); | 38 | RETURNWERR(errno, NULL); |
| 36 | } | 39 | } |
| 37 | 40 | ||
| @@ -93,7 +96,7 @@ int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd) | |||
| 93 | // Here's a good reference of this implemented in C++ using Boost: https://gist.github.com/mikeando/482342 | 96 | // Here's a good reference of this implemented in C++ using Boost: https://gist.github.com/mikeando/482342 |
| 94 | 97 | ||
| 95 | typedef struct cq { | 98 | typedef struct cq { |
| 96 | 99 | void*placehoilder; | |
| 97 | } cqueue; | 100 | } cqueue; |
| 98 | 101 | ||
| 99 | typedef struct task { | 102 | typedef struct task { |
