|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xenpaging: convert xenpaging_t to struct xenpaging
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1326125246 -3600
# Node ID 42dab0075a9205efc30a0014199c776ffc5cd842
# Parent 47ca45c8b318d37bb8412ce3d96cf7a37dcce743
xenpaging: convert xenpaging_t to struct xenpaging
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---
diff -r 47ca45c8b318 -r 42dab0075a92 tools/xenpaging/pagein.c
--- a/tools/xenpaging/pagein.c Mon Jan 09 17:07:21 2012 +0100
+++ b/tools/xenpaging/pagein.c Mon Jan 09 17:07:26 2012 +0100
@@ -61,7 +61,7 @@
pthread_cond_signal(&page_in_cond);
}
-void create_page_in_thread(xenpaging_t *paging)
+void create_page_in_thread(struct xenpaging *paging)
{
page_in_args.dom = paging->mem_event.domain_id;
page_in_args.pagein_queue = paging->pagein_queue;
diff -r 47ca45c8b318 -r 42dab0075a92 tools/xenpaging/policy.h
--- a/tools/xenpaging/policy.h Mon Jan 09 17:07:21 2012 +0100
+++ b/tools/xenpaging/policy.h Mon Jan 09 17:07:26 2012 +0100
@@ -28,8 +28,8 @@
#include "xenpaging.h"
-int policy_init(xenpaging_t *paging);
-int policy_choose_victim(xenpaging_t *paging, struct victim *victim);
+int policy_init(struct xenpaging *paging);
+int policy_choose_victim(struct xenpaging *paging, struct victim *victim);
void policy_notify_paged_out(unsigned long gfn);
void policy_notify_paged_in(unsigned long gfn);
void policy_notify_paged_in_nomru(unsigned long gfn);
diff -r 47ca45c8b318 -r 42dab0075a92 tools/xenpaging/policy_default.c
--- a/tools/xenpaging/policy_default.c Mon Jan 09 17:07:21 2012 +0100
+++ b/tools/xenpaging/policy_default.c Mon Jan 09 17:07:26 2012 +0100
@@ -37,7 +37,7 @@
static unsigned long max_pages;
-int policy_init(xenpaging_t *paging)
+int policy_init(struct xenpaging *paging)
{
int i;
int rc = -ENOMEM;
@@ -77,7 +77,7 @@
return rc;
}
-int policy_choose_victim(xenpaging_t *paging, struct victim *victim)
+int policy_choose_victim(struct xenpaging *paging, struct victim *victim)
{
xc_interface *xch = paging->xc_handle;
unsigned long wrap = current_gfn;
diff -r 47ca45c8b318 -r 42dab0075a92 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c Mon Jan 09 17:07:21 2012 +0100
+++ b/tools/xenpaging/xenpaging.c Mon Jan 09 17:07:26 2012 +0100
@@ -61,7 +61,7 @@
unlink_pagefile();
}
-static int xenpaging_mem_paging_flush_ioemu_cache(xenpaging_t *paging)
+static int xenpaging_mem_paging_flush_ioemu_cache(struct xenpaging *paging)
{
struct xs_handle *xsh = paging->xs_handle;
domid_t domain_id = paging->mem_event.domain_id;
@@ -75,7 +75,7 @@
return rc == true ? 0 : -1;
}
-static int xenpaging_wait_for_event_or_timeout(xenpaging_t *paging)
+static int xenpaging_wait_for_event_or_timeout(struct xenpaging *paging)
{
xc_interface *xch = paging->xc_handle;
xc_evtchn *xce = paging->mem_event.xce_handle;
@@ -163,7 +163,7 @@
return rc;
}
-static int xenpaging_get_tot_pages(xenpaging_t *paging)
+static int xenpaging_get_tot_pages(struct xenpaging *paging)
{
xc_interface *xch = paging->xc_handle;
xc_domaininfo_t domain_info;
@@ -218,7 +218,7 @@
printf(" -h --help this output.\n");
}
-static int xenpaging_getopts(xenpaging_t *paging, int argc, char *argv[])
+static int xenpaging_getopts(struct xenpaging *paging, int argc, char *argv[])
{
int ch;
static const char sopts[] = "hvd:f:m:r:";
@@ -277,9 +277,9 @@
return 0;
}
-static xenpaging_t *xenpaging_init(int argc, char *argv[])
+static struct xenpaging *xenpaging_init(int argc, char *argv[])
{
- xenpaging_t *paging;
+ struct xenpaging *paging;
xc_domaininfo_t domain_info;
xc_interface *xch = NULL;
xentoollog_logger *dbg = NULL;
@@ -287,7 +287,7 @@
int rc;
/* Allocate memory */
- paging = calloc(1, sizeof(xenpaging_t));
+ paging = calloc(1, sizeof(struct xenpaging));
if ( !paging )
goto err;
@@ -475,7 +475,7 @@
return NULL;
}
-static int xenpaging_teardown(xenpaging_t *paging)
+static int xenpaging_teardown(struct xenpaging *paging)
{
int rc;
xc_interface *xch;
@@ -561,7 +561,7 @@
RING_PUSH_RESPONSES(back_ring);
}
-static int xenpaging_evict_page(xenpaging_t *paging, struct victim *victim,
int fd, int i)
+static int xenpaging_evict_page(struct xenpaging *paging, struct victim
*victim, int fd, int i)
{
xc_interface *xch = paging->xc_handle;
void *page;
@@ -612,7 +612,7 @@
return ret;
}
-static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t
*rsp, int notify_policy)
+static int xenpaging_resume_page(struct xenpaging *paging,
mem_event_response_t *rsp, int notify_policy)
{
int ret;
@@ -646,7 +646,7 @@
return ret;
}
-static int xenpaging_populate_page(xenpaging_t *paging,
+static int xenpaging_populate_page(struct xenpaging *paging,
xen_pfn_t gfn, int fd, int i)
{
xc_interface *xch = paging->xc_handle;
@@ -690,7 +690,7 @@
}
/* Trigger a page-in for a batch of pages */
-static void resume_pages(xenpaging_t *paging, int num_pages)
+static void resume_pages(struct xenpaging *paging, int num_pages)
{
xc_interface *xch = paging->xc_handle;
int i, num = 0;
@@ -710,7 +710,7 @@
page_in_trigger();
}
-static int evict_victim(xenpaging_t *paging, struct victim *victim, int fd,
int i)
+static int evict_victim(struct xenpaging *paging, struct victim *victim, int
fd, int i)
{
xc_interface *xch = paging->xc_handle;
int j = 0;
@@ -753,7 +753,7 @@
}
/* Evict a batch of pages and write them to a free slot in the paging file */
-static int evict_pages(xenpaging_t *paging, int fd, struct victim *victims,
int num_pages)
+static int evict_pages(struct xenpaging *paging, int fd, struct victim
*victims, int num_pages)
{
xc_interface *xch = paging->xc_handle;
int rc, slot, num = 0;
@@ -779,7 +779,7 @@
int main(int argc, char *argv[])
{
struct sigaction act;
- xenpaging_t *paging;
+ struct xenpaging *paging;
struct victim *victims;
mem_event_request_t req;
mem_event_response_t rsp;
diff -r 47ca45c8b318 -r 42dab0075a92 tools/xenpaging/xenpaging.h
--- a/tools/xenpaging/xenpaging.h Mon Jan 09 17:07:21 2012 +0100
+++ b/tools/xenpaging/xenpaging.h Mon Jan 09 17:07:26 2012 +0100
@@ -40,7 +40,7 @@
void *ring_page;
} mem_event_t;
-typedef struct xenpaging {
+struct xenpaging {
xc_interface *xc_handle;
struct xs_handle *xs_handle;
@@ -54,7 +54,7 @@
int policy_mru_size;
int debug;
unsigned long pagein_queue[XENPAGING_PAGEIN_QUEUE_SIZE];
-} xenpaging_t;
+};
struct victim {
@@ -63,7 +63,7 @@
};
-extern void create_page_in_thread(xenpaging_t *paging);
+extern void create_page_in_thread(struct xenpaging *paging);
extern void page_in_trigger(void);
#endif // __XEN_PAGING_H__
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |