|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 3/5] tools/libs/toolcore: replace _xentoolcore_list.h with _xen_list.h
Remove generating _xentoolcore_list.h and use the common _xen_list.h
instead.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
v3:
- fix build (Anthony PERARD)
---
.gitignore | 1 -
tools/include/xentoolcore_internal.h | 4 ++--
tools/libs/toolcore/Makefile | 8 --------
tools/libs/toolcore/handlereg.c | 8 ++++----
4 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/.gitignore b/.gitignore
index 3f9d55ba87..afe78c787c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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)
diff --git a/tools/include/xentoolcore_internal.h
b/tools/include/xentoolcore_internal.h
index 04f5848f09..deccefd612 100644
--- a/tools/include/xentoolcore_internal.h
+++ b/tools/include/xentoolcore_internal.h
@@ -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*);
diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile
index ed4ae00694..9c013b2879 100644
--- a/tools/libs/toolcore/Makefile
+++ b/tools/libs/toolcore/Makefile
@@ -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,$@)
diff --git a/tools/libs/toolcore/handlereg.c b/tools/libs/toolcore/handlereg.c
index baec55e2a4..b43cb0e8ac 100644
--- a/tools/libs/toolcore/handlereg.c
+++ b/tools/libs/toolcore/handlereg.c
@@ -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;
}
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |