changeset 75:6d3b76317a98

suntaskq: almost make it build on linux There are uses of umem_alloc() and umem_free(). These functions should exist in fakeumem, but they currently don't. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Fri, 21 Aug 2015 12:43:12 -0400
parents 2ec5a7537b88
children 96306120da0d
files src/suntaskq/include/nomad/taskq.h src/suntaskq/taskq.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/suntaskq/include/nomad/taskq.h	Fri Aug 21 12:41:11 2015 -0400
+++ b/src/suntaskq/include/nomad/taskq.h	Fri Aug 21 12:43:12 2015 -0400
@@ -62,9 +62,9 @@
 
 extern taskq_t *system_taskq;
 
-extern taskq_t	*taskq_create(const char *, int, int, int, uint_t);
-extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t);
-extern void	taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t,
+extern taskq_t	*taskq_create(const char *, int, int, int, unsigned int);
+extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, unsigned int);
+extern void	taskq_dispatch_ent(taskq_t *, task_func_t, void *, unsigned int,
     taskq_ent_t *);
 extern void	taskq_destroy(taskq_t *);
 extern void	taskq_wait(taskq_t *);
--- a/src/suntaskq/taskq.c	Fri Aug 21 12:41:11 2015 -0400
+++ b/src/suntaskq/taskq.c	Fri Aug 21 12:43:12 2015 -0400
@@ -67,7 +67,7 @@
 task_alloc(taskq_t *tq, int tqflags)
 {
 	taskq_ent_t *t;
-	timestruc_t ts;
+	struct timespec ts;
 	int err;
 
 again:	if ((t = tq->tq_freelist) != NULL && tq->tq_nalloc >= tq->tq_minalloc) {
@@ -127,7 +127,7 @@
 }
 
 taskqid_t
-taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t tqflags)
+taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, unsigned int tqflags)
 {
 	taskq_ent_t *t;
 
@@ -160,7 +160,7 @@
 }
 
 void
-taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags,
+taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, unsigned int flags,
     taskq_ent_t *t)
 {
 	ASSERT(func != NULL);
@@ -205,7 +205,7 @@
 {
 	taskq_t *tq = arg;
 	taskq_ent_t *t;
-	boolean_t prealloc;
+	bool prealloc;
 
 	mxlock(&tq->tq_lock);
 	while (tq->tq_flags & TASKQ_ACTIVE) {
@@ -240,7 +240,7 @@
 /*ARGSUSED*/
 taskq_t *
 taskq_create(const char *name, int nthreads,
-	int minalloc, int maxalloc, uint_t flags)
+	int minalloc, int maxalloc, unsigned int flags)
 {
 	taskq_t *tq;
 	int t;