aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/linuxkpi
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-03-07 12:09:14 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-03-07 12:09:14 +0000
commitca2ad6bd779fae857f27b028d736f506b66a528a (patch)
treed744de5c930111de6d7e3d09087ecbad44fa0ba6 /sys/modules/linuxkpi
parenta81683c37110b4ea67bdb2976c5fdad50650ffa2 (diff)
downloadsrc-ca2ad6bd779fae857f27b028d736f506b66a528a.tar.gz
src-ca2ad6bd779fae857f27b028d736f506b66a528a.zip
LinuxKPI workqueue cleanup.
This change makes the workqueue implementation behave more like in Linux, both functionality wise and structure wise. All workqueue code has been moved to linux_work.c Add an atomic based statemachine to the work_struct to ensure proper operation. Prior to this change struct_work was directly mapped to a FreeBSD task. When a taskqueue has multiple threads the same task may end up being executed on more than one worker thread simultaneously. This might cause problems with code coming from Linux, which expects serial behaviour, similar to Linux tasklets. Move all global workqueue function names into the linux_xxx domain to avoid symbol name clashes in the future. Implement a few more workqueue related functions and macros. Create two multithreaded taskqueues for the LinuxKPI during module load, one for time-consuming callbacks and one for non-time consuming callbacks. MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=314843
Diffstat (limited to 'sys/modules/linuxkpi')
-rw-r--r--sys/modules/linuxkpi/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile
index 1e87aefe31f0..e9e644964985 100644
--- a/sys/modules/linuxkpi/Makefile
+++ b/sys/modules/linuxkpi/Makefile
@@ -12,7 +12,8 @@ SRCS= linux_kmod.c \
linux_rcu.c \
linux_tasklet.c \
linux_idr.c \
- linux_usb.c
+ linux_usb.c \
+ linux_work.c
SRCS+= bus_if.h \
device_if.h \