diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 19 |
1 files changed, 17 insertions, 2 deletions
| @@ -3,12 +3,27 @@ | |||
| 3 | #include "encryption.h" | 3 | #include "encryption.h" |
| 4 | #include "scanner.h" | 4 | #include "scanner.h" |
| 5 | #include "shared.h" | 5 | #include "shared.h" |
| 6 | 6 | #include "threadpool.h" | |
| 7 | 7 | ||
| 8 | #include <errno.h> | 8 | #include <errno.h> |
| 9 | #include <error.h> | 9 | #include <error.h> |
| 10 | 10 | ||
| 11 | #include <stdio.h> | ||
| 12 | int testcb(void *data) { | ||
| 13 | if(!data) | ||
| 14 | return -1; | ||
| 15 | |||
| 16 | printf("%s\n", (char*)data); | ||
| 17 | return 0; | ||
| 18 | } | ||
| 19 | |||
| 11 | int main() { | 20 | int main() { |
| 12 | error(1, ENOTSUP, "No main file lol"); | 21 | // error(1, ENOTSUP, "No main file lol"); |
| 22 | |||
| 23 | threadpool *tp = threadpool_init(2); | ||
| 24 | task *tsk = task_init(testcb, "This is some data"); | ||
| 25 | threadpool_addtask(tp, tsk); | ||
| 26 | threadpool_free(tp); | ||
| 27 | |||
| 13 | return 0; | 28 | return 0; |
| 14 | } \ No newline at end of file | 29 | } \ No newline at end of file |
