summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-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