diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2012-01-31 16:06:14 +0000 |
---|---|---|
committer | Ian Campbell <Ian.Campbell@citrix.com> | 2012-01-31 16:06:14 +0000 |
commit | 1a4af67d32b1c39b73e09346203f3e12c00b9e41 (patch) | |
tree | ee7058fc62cdec6fe3f3582a63f99f90bd05bb24 /tools | |
parent | f17888fc962b5249f9b6b34f28a61998c3092018 (diff) | |
download | xen-1a4af67d32b1c39b73e09346203f3e12c00b9e41.tar.gz xen-1a4af67d32b1c39b73e09346203f3e12c00b9e41.tar.bz2 xen-1a4af67d32b1c39b73e09346203f3e12c00b9e41.zip |
mini-os: use BSD sys/queue.h instead of Linux list.h
The latter is GPL which makes the whole of mini-os GPL rather than BSD
as intended. In tree users are all GPL or GPL-compatible but we should
fix this so that mini-os is BSD. Do so by using the same BSD
sys/queue.h as we use in libxl.
Tested with the builtin mini-os test app and qemu stubdomain, both of which
appear to still function as expected.
Move tools/libxl/external and the associated sed script to
tools/include/xen-external to allow more sensible access from mini-os.
Also add s/NULL/0/ in the sed script due to NULL not always being
defined in stubdom code when mini-os/wait.h is included.
As well as the obvious ABI changes there are a few API updates
associated with the change:
- struct rw_semaphore.wait_list is unused
- remove_waiter needs to take the wait_queue_head
The latter requires a qemu update, so there is also a QEMU_TAG
update in this changeset.
I sprinkled some extra-emacs local variables around the files I edited
which didn't have them.
I think this should be backported to the stable branches since
external users of mini-os may have been mislead into thinking they
could safely link mini-os against GPL-incompatible code.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/xen-external/README (renamed from tools/libxl/external/README) | 14 | ||||
-rw-r--r-- | tools/include/xen-external/bsd-COPYRIGHT (renamed from tools/libxl/external/bsd-COPYRIGHT) | 0 | ||||
-rw-r--r-- | tools/include/xen-external/bsd-queue.3 (renamed from tools/libxl/external/bsd-queue.3) | 0 | ||||
-rwxr-xr-x | tools/include/xen-external/bsd-sys-queue-h-seddery (renamed from tools/libxl/bsd-sys-queue-h-seddery) | 2 | ||||
-rw-r--r-- | tools/include/xen-external/bsd-sys-queue.h (renamed from tools/libxl/external/bsd-sys-queue.h) | 0 | ||||
-rw-r--r-- | tools/libxl/Makefile | 4 |
6 files changed, 16 insertions, 4 deletions
diff --git a/tools/libxl/external/README b/tools/include/xen-external/README index 8c8beea3f9..93c2bc9cd8 100644 --- a/tools/libxl/external/README +++ b/tools/include/xen-external/README @@ -1,5 +1,5 @@ -WARNING - DO NOT EDIT THINGS IN THIS DIRECTORY (apart from this README) ------------------------------------------------------------------------ +WARNING - DO NOT EDIT THINGS IN THIS DIRECTORY +---------------------------------------------- These files were obtained elsewhere and should only be updated by copying new versions from the source location, as documented below: @@ -12,3 +12,13 @@ bsd-queue.3 svn co -r 221843 svn://svn.freebsd.org/base/head/sys/sys/ svn co -r 221843 svn://svn.freebsd.org/base/head/share/man/man3 svn cat -r 221843 http://svn.freebsd.org/base/head/COPYRIGHT >tools/libxl/external/bsd-COPYRIGHT + +Exceptions: + +README + + This file + +bsd-sys-queue-h-seddery + + Script to transform the above into a new namespace. diff --git a/tools/libxl/external/bsd-COPYRIGHT b/tools/include/xen-external/bsd-COPYRIGHT index 6dc5d16b46..6dc5d16b46 100644 --- a/tools/libxl/external/bsd-COPYRIGHT +++ b/tools/include/xen-external/bsd-COPYRIGHT diff --git a/tools/libxl/external/bsd-queue.3 b/tools/include/xen-external/bsd-queue.3 index 007ca5c629..007ca5c629 100644 --- a/tools/libxl/external/bsd-queue.3 +++ b/tools/include/xen-external/bsd-queue.3 diff --git a/tools/libxl/bsd-sys-queue-h-seddery b/tools/include/xen-external/bsd-sys-queue-h-seddery index c0aa079cbe..7a957e3a10 100755 --- a/tools/libxl/bsd-sys-queue-h-seddery +++ b/tools/include/xen-external/bsd-sys-queue-h-seddery @@ -68,3 +68,5 @@ s/\b( s/\b struct \s+ type \b/type/xg; s,^\#include.*sys/cdefs.*,/* $& */,xg; + +s/\b( NULL )/0/xg; diff --git a/tools/libxl/external/bsd-sys-queue.h b/tools/include/xen-external/bsd-sys-queue.h index 274e636c53..274e636c53 100644 --- a/tools/libxl/external/bsd-sys-queue.h +++ b/tools/include/xen-external/bsd-sys-queue.h diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index b58c43ecb7..d0b6fda277 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -93,8 +93,8 @@ _libxl_paths.h: genpath rm -f $@.tmp $(call move-if-changed,$@.2.tmp,$@) -_libxl_list.h: bsd-sys-queue-h-seddery external/bsd-sys-queue.h - perl ./$^ --prefix=libxl >$@.new +_libxl_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h + perl $^ --prefix=libxl >$@.new $(call move-if-changed,$@.new,$@) libxl_paths.c: _libxl_paths.h |