summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/taskqueue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/taskqueue.h b/sys/sys/taskqueue.h
index dda64cc..b4c7d20 100644
--- a/sys/sys/taskqueue.h
+++ b/sys/sys/taskqueue.h
@@ -77,6 +77,12 @@ void taskqueue_block(struct taskqueue *queue);
void taskqueue_unblock(struct taskqueue *queue);
int taskqueue_member(struct taskqueue *queue, struct thread *td);
+#define TASK_INITIALIZER(priority, func, context) \
+ { .ta_pending = 0, \
+ .ta_priority = (priority), \
+ .ta_func = (func), \
+ .ta_context = (context) }
+
/*
* Functions for dedicated thread taskqueues
*/
OpenPOWER on IntegriCloud