diff options
| author | @syxhe <https://t.me/syxhe> | 2025-04-22 16:59:33 -0500 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-04-22 16:59:33 -0500 |
| commit | 39c3fa785cafd5fa9b75bfbf92d7a702310ba480 (patch) | |
| tree | 700be73b55b791ab3907fc7d39a92a888ff94b34 /src/main.c | |
| parent | 0ee5044805c8d157d5023fc1322f980e3a480df7 (diff) | |
Yay segfault
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 |
