summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-05-18 04:48:30 -0500
committer@syxhe <https://t.me/syxhe>2025-05-18 04:48:30 -0500
commit8fe1a7ea459829145dfef4b0aa8f627f96841cbd (patch)
tree745fba3af25ecdb6368a9e55bbc6330d14f16885
parent60715c7785e7fbe4759df64258ad58a8e2a0769d (diff)
Still crashing. Lovely
-rwxr-xr-xsrc/main.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 97310fc..73169d1 100755
--- a/src/main.c
+++ b/src/main.c
@@ -5,10 +5,33 @@
5#include "shared.h" 5#include "shared.h"
6#include "threadpool.h" 6#include "threadpool.h"
7 7
8#include "errno.h" 8#include <errno.h>
9#include "error.h" 9#include <error.h>
10#include <printf.h>
11#include <unistd.h>
12
13int testcb(void *arg) {
14 if(!arg)
15 return -1;
16
17 printf("%s\n", (char*)arg);
18
19 return 0;
20}
10 21
11int main() { 22int main() {
12 error(-1, ENOTSUP, "lol"); 23 // error(-1, ENOTSUP, "lol");
24
25 cqueue *cq = cqueue_init();
26 // if(!cq)
27 // abort();
28
29 cqueue_registerthreads(cq, 10);
30 cqueue_addtask(cq, task_init(testcb, "this is some data"));
31
32 sleep(3);
33
34 cqueue_free(cq);
35
13 return 0; 36 return 0;
14} \ No newline at end of file 37} \ No newline at end of file