From b123971fc2f951cc95c8f75db68adf05d3a1d1aa Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 11 Mar 2008 02:08:57 +0000 Subject: [PATCH] Two more GPL only symbols moved to helper functions in the spl module. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@37 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/taskq.h | 6 ++++-- modules/spl/spl-taskq.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 811b995570..14ba33280a 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -71,13 +71,15 @@ extern void taskq_resume(taskq_t *); extern taskqid_t __taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t); +extern void __taskq_destroy(taskq_t *); +extern void __taskq_wait(taskq_t *); #define taskq_create(name, thr, pri, min, max, flags) \ __taskq_create(name, thr, pri, min, max, flags) #define taskq_dispatch(tq, func, priv, flags) \ __taskq_dispatch(tq, (task_func_t)func, priv, flags) -#define taskq_destroy(tq) destroy_workqueue(tq) -#define taskq_wait(tq) flush_workqueue(tq) +#define taskq_destroy(tq) __taskq_destroy(tq) +#define taskq_wait(tq) __taskq_wait(tq) #define taskq_member(tq, kthr) 1 /* XXX -Just be true */ #ifdef __cplusplus diff --git a/modules/spl/spl-taskq.c b/modules/spl/spl-taskq.c index 0bfae54526..67db1064ba 100644 --- a/modules/spl/spl-taskq.c +++ b/modules/spl/spl-taskq.c @@ -78,3 +78,17 @@ __taskq_create(const char *name, int nthreads, pri_t pri, return create_singlethread_workqueue(name); } EXPORT_SYMBOL(__taskq_create); + +void +__taskq_destroy(taskq_t *tq) +{ + destroy_workqueue(tq); +} +EXPORT_SYMBOL(__taskq_destroy); + +void +__taskq_wait(taskq_t *tq) +{ + flush_workqueue(tq); +} +EXPORT_SYMBOL(__taskq_wait);