[svn-commits] fjoe: freebsd/trunk r8339 - in /freebsd/trunk: drivers/dahdi/wctdm24xxp/ incl...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 15 14:17:24 CDT 2010


Author: fjoe
Date: Mon Mar 15 14:17:21 2010
New Revision: 8339

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8339
Log:
- Workqueue KPI:
        - remove flush_scheduled_work() and flush_workqueue() -- can not be implemented
        in terms of FreeBSD KPI easily
        - implement flush_work() that can be used as a replacement for flush_scheduled_work()
        - "hide" work_run()
        - use PI_REALTIME priority
- Tasklet KPI: use PI_REALTIME priority

Modified:
    freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
    freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.c
    freebsd/trunk/include/dahdi/compat/bsd.h

Modified: freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=8339&r1=8338&r2=8339
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c Mon Mar 15 14:17:21 2010
@@ -4966,7 +4966,9 @@
 		if (vpm) {
 			clear_bit(VPM150M_DTMFDETECT, &vpm->control);
 			clear_bit(VPM150M_ACTIVE, &vpm->control);
+#if !defined(__FreeBSD__)
 			flush_scheduled_work();
+#endif
 		}
 
 		/* shut down any BRI modules */

Modified: freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.c?view=diff&rev=8339&r1=8338&r2=8339
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.c Mon Mar 15 14:17:21 2010
@@ -2124,7 +2124,11 @@
 			down(&wc->syncsem);
 			b4s[i]->shutdown = 1;
 			up(&wc->syncsem);
+#if defined(__FreeBSD__)
+			flush_work(&b4s[i]->xhfc_wq);
+#else
 			flush_workqueue(b4s[i]->xhfc_ws);
+#endif
 		}
 	}
 }

Modified: freebsd/trunk/include/dahdi/compat/bsd.h
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/include/dahdi/compat/bsd.h?view=diff&rev=8339&r1=8338&r2=8339
==============================================================================
--- freebsd/trunk/include/dahdi/compat/bsd.h (original)
+++ freebsd/trunk/include/dahdi/compat/bsd.h Mon Mar 15 14:17:21 2010
@@ -232,17 +232,19 @@
 struct work_struct {
 	struct task task;
 	work_func_t func;
+	struct taskqueue *tq;
 };
 
 #define INIT_WORK(ws, wf)					\
 	do {							\
-		TASK_INIT(&(ws)->task, 0, work_run, (ws));	\
+		TASK_INIT(&(ws)->task, 0, _work_run, (ws));	\
 		(ws)->func = (wf);				\
+		(ws)->tq = taskqueue_fast;			\
 	} while (0)
-void work_run(void *context, int pending);
+void _work_run(void *context, int pending);
 void schedule_work(struct work_struct *work);
 void cancel_work_sync(struct work_struct *work);
-void flush_scheduled_work(void);
+void flush_work(struct work_struct *work);
 
 struct workqueue_struct {
 	struct taskqueue *tq;
@@ -251,7 +253,6 @@
 struct workqueue_struct *create_singlethread_workqueue(const char *name);
 void destroy_workqueue(struct workqueue_struct *wq);
 void queue_work(struct workqueue_struct *wq, struct work_struct *work);
-void flush_workqueue(struct workqueue_struct *wq);
 
 /*
  * Logging and assertions API




More information about the svn-commits mailing list