summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-09-17 15:32:32 +0000
committerrodri <rgl@antares-labs.eu>2024-09-17 15:32:32 +0000
commitbeca6100b73428b4b72973275d2989a4c6581f51 (patch)
treefa92bd9fcc11848614519c062ee1ccc4a7ec1364 /internal.h
parent4e3927d643a352bb65665cfbb5547355aa1aaa82 (diff)
downloadlibgraphics-beca6100b73428b4b72973275d2989a4c6581f51.tar.gz
libgraphics-beca6100b73428b4b72973275d2989a4c6581f51.tar.bz2
libgraphics-beca6100b73428b4b72973275d2989a4c6581f51.zip
a better turbopool.
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/internal.h b/internal.h
index e1c81ca..837cad6 100644
--- a/internal.h
+++ b/internal.h
@@ -39,26 +39,22 @@ struct Rastertask
Primitive p;
};
-typedef struct Proctask Proctask;
-typedef struct Procpool Procpool;
+typedef struct Turbotask Turbotask;
+typedef struct Turbopool Turbopool;
-struct Proctask
+struct Turbotask
{
void (*fn)(void*);
void *arg;
};
-struct Procpool
+struct Turbopool
{
ulong nprocs;
- Ref issued;
- Ref complete;
-
Channel *subq; /* task submission queue */
- Channel *done; /* task completion signal */
};
-extern Procpool *turbodrawingpool;
+extern Turbopool *turbopool;
/* alloc */
void *emalloc(ulong);
@@ -100,11 +96,10 @@ void memsetl(void*, ulong, usize);
/* nanosec */
uvlong nanosec(void);
-/* procpool */
-Procpool *mkprocpool(ulong);
-void procpoolexec(Procpool*, void(*)(void*), void*);
-void procpoolwait(Procpool*);
-void rmprocpool(Procpool*);
+/* turbopool */
+Turbopool *mkturbopool(ulong);
+void turbopoolexec(Turbopool*, void(*)(void*), void*);
+void rmturbopool(Turbopool*);
#define getpixel(fb, p) rastergetcolor(fb, p)
#define putpixel(fb, p, c) rasterputcolor(fb, p, c)