summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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
commit39c3fa785cafd5fa9b75bfbf92d7a702310ba480 (patch)
tree700be73b55b791ab3907fc7d39a92a888ff94b34 /src/main.c
parent0ee5044805c8d157d5023fc1322f980e3a480df7 (diff)
Yay segfault
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 2fcf8ab..f89a124 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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>
12int testcb(void *data) {
13 if(!data)
14 return -1;
15
16 printf("%s\n", (char*)data);
17 return 0;
18}
19
11int main() { 20int 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