summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fb.c7
-rw-r--r--internal.h23
-rw-r--r--mkfile2
-rw-r--r--render.c4
4 files changed, 17 insertions, 19 deletions
diff --git a/fb.c b/fb.c
index e17b227..9fef534 100644
--- a/fb.c
+++ b/fb.c
@@ -212,6 +212,7 @@ upscaledraw(Raster *fb, Image *dst, Point off, Point scale, uint filter)
// Rectangle dr;
// uchar *src;
// ulong len;
+// Channel *done; /* task completion signal */
//};
//static void
//ldimgtask(void *arg)
@@ -220,6 +221,7 @@ upscaledraw(Raster *fb, Image *dst, Point off, Point scale, uint filter)
//
// t = arg;
// loadimage(t->dst, t->dr, t->src, t->len);
+// nbsend(t->done, nil);
//}
static void
@@ -306,9 +308,10 @@ framebufctl_draw(Framebufctl *ctl, Image *dst, char *name, Point off, Point scal
// tasks[i].dr.max.y = dr.max.y;
// tasks[i].len = len - i*stride;
// }
-// procpoolexec(turbodrawingpool, ldimgtask, &tasks[i]);
+// turbopoolexec(turbodrawingpool, ldimgtask, &tasks[i]);
// }
-// procpoolwait(turbodrawingpool);
+// for(i = 0; i < turbodrawingpool->nprocs; i++)
+// recvp(tasks[i].done);
// free(tasks);
tmp = allocimage(display, sr, RGBA32, 0, DNofill);
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)
diff --git a/mkfile b/mkfile
index 7a5c535..b0565dd 100644
--- a/mkfile
+++ b/mkfile
@@ -17,7 +17,7 @@ OFILES=\
color.$O\
util.$O\
nanosec.$O\
- procpool.$O\
+ turbopool.$O\
HFILES=\
graphics.h\
diff --git a/render.c b/render.c
index 4f79cc2..6b9e4f6 100644
--- a/render.c
+++ b/render.c
@@ -9,7 +9,7 @@
#include "internal.h"
Rectangle UR = {0,0,1,1};
-//Procpool *turbodrawingpool;
+//Turbopool *turbopool;
static Vertexattr *
sparams_getuniform(Shaderparams *sp, char *id)
@@ -732,7 +732,7 @@ initgraphics(void)
nproc = 1;
free(nprocs);
-// turbodrawingpool = mkprocpool(nproc);
+// turbopool = mkturbopool(nproc);
r = emalloc(sizeof *r);
memset(r, 0, sizeof *r);