tools/libs/toolcore: replace _xentoolcore_list.h with _xen_list.h
authorJuergen Gross <jgross@suse.com>
Tue, 8 Feb 2022 07:06:36 +0000 (08:06 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Feb 2022 11:10:52 +0000 (11:10 +0000)
Remove generating _xentoolcore_list.h and use the common _xen_list.h
instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
.gitignore
tools/include/xentoolcore_internal.h
tools/libs/toolcore/Makefile
tools/libs/toolcore/handlereg.c

index 1f53b0320e8c283c6016f71a37bb491a3e0a3f52..2403841e499be4a5c79a337d644bda233dd3e9c5 100644 (file)
@@ -227,7 +227,6 @@ tools/hotplug/NetBSD/rc.d/xencommons
 tools/hotplug/NetBSD/rc.d/xendriverdomain
 tools/include/acpi
 tools/include/_libxl*.h
-tools/include/_xentoolcore_list.h
 tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
index 04f5848f097849f5662d7a0172a91db739d79f58..deccefd612a058c3e9d6073f8eb47ffcfec9c252 100644 (file)
@@ -27,7 +27,7 @@
 #include <stddef.h>
 
 #include "xentoolcore.h"
-#include "_xentoolcore_list.h"
+#include "_xen_list.h"
 
 /*---------- active handle registration ----------*/
 
@@ -87,7 +87,7 @@ typedef int Xentoolcore__Restrict_Callback(Xentoolcore__Active_Handle*,
 
 struct Xentoolcore__Active_Handle {
     Xentoolcore__Restrict_Callback *restrict_callback;
-    XENTOOLCORE_LIST_ENTRY(Xentoolcore__Active_Handle) entry;
+    XEN_LIST_ENTRY(Xentoolcore__Active_Handle) entry;
 };
 
 void xentoolcore__register_active_handle(Xentoolcore__Active_Handle*);
index ed4ae00694beadc331e230c2245bf7af70cfc8c0..9c013b2879579e99de3a8746f84f56212dd24502 100644 (file)
@@ -3,7 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR  = 1
 MINOR  = 0
-AUTOINCS := $(XEN_INCLUDE)/_xentoolcore_list.h
 
 LIBHEADER := xentoolcore.h
 
@@ -12,10 +11,3 @@ SRCS-y       += handlereg.c
 include $(XEN_ROOT)/tools/libs/libs.mk
 
 PKG_CONFIG_DESC := Central support for Xen Hypervisor userland libraries
-
-$(LIB_OBJS): $(AUTOINCS)
-$(PIC_OBJS): $(AUTOINCS)
-
-$(XEN_INCLUDE)/_xentoolcore_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h
-       $(PERL) $^ --prefix=xentoolcore >$(notdir $@).new
-       $(call move-if-changed,$(notdir $@).new,$@)
index baec55e2a4dc77ef1eb81e5fcb8d6ae52d941eb5..b43cb0e8acab7a06d65a3215934bd56e1e8d93a0 100644 (file)
@@ -31,7 +31,7 @@
 #include <assert.h>
 
 static pthread_mutex_t handles_lock = PTHREAD_MUTEX_INITIALIZER;
-static XENTOOLCORE_LIST_HEAD(, Xentoolcore__Active_Handle) handles;
+static XEN_LIST_HEAD(, Xentoolcore__Active_Handle) handles;
 
 static void lock(void) {
     int e = pthread_mutex_lock(&handles_lock);
@@ -45,13 +45,13 @@ static void unlock(void) {
 
 void xentoolcore__register_active_handle(Xentoolcore__Active_Handle *ah) {
     lock();
-    XENTOOLCORE_LIST_INSERT_HEAD(&handles, ah, entry);
+    XEN_LIST_INSERT_HEAD(&handles, ah, entry);
     unlock();
 }
 
 void xentoolcore__deregister_active_handle(Xentoolcore__Active_Handle *ah) {
     lock();
-    XENTOOLCORE_LIST_REMOVE(ah, entry);
+    XEN_LIST_REMOVE(ah, entry);
     unlock();
 }
 
@@ -60,7 +60,7 @@ int xentoolcore_restrict_all(domid_t domid) {
     Xentoolcore__Active_Handle *ah;
 
     lock();
-    XENTOOLCORE_LIST_FOREACH(ah, &handles, entry) {
+    XEN_LIST_FOREACH(ah, &handles, entry) {
         r = ah->restrict_callback(ah, domid);
         if (r) goto out;
     }