qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions


From: arei.gonglei
Subject: [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age
Date: Tue, 11 Mar 2014 20:53:33 +0800

From: ChenLiang <address@hidden>

Signed-off-by: ChenLiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
 arch_init.c                    | 4 ++--
 include/migration/page_cache.h | 4 ++--
 page_cache.c                   | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index 461a10a..1c1488a 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -109,7 +109,7 @@ const uint32_t arch_type = QEMU_ARCH;
 static bool mig_throttle_on;
 static void check_guest_throttling(void);
 
-static uint64_t bitmap_sync_cnt;
+static int64_t bitmap_sync_cnt;
 /* the functions *_bitmap_sync_cnt only run in migrate thread */
 static inline void reset_bitmap_sync_cnt(void)
 {
@@ -121,7 +121,7 @@ static inline void increase_bitmap_sync_cnt(void)
     bitmap_sync_cnt++;
 }
 
-static inline uint64_t get_bitmap_sync_cnt(void)
+static inline int64_t get_bitmap_sync_cnt(void)
 {
     return bitmap_sync_cnt;
 }
diff --git a/include/migration/page_cache.h b/include/migration/page_cache.h
index dc0c6b5..34518ba 100644
--- a/include/migration/page_cache.h
+++ b/include/migration/page_cache.h
@@ -46,7 +46,7 @@ void cache_fini(PageCache *cache);
  * @current_age indicate the age of the page if cache hit
  */
 bool cache_is_cached(const PageCache *cache, uint64_t addr,
-                     uint64_t current_age);
+                     int64_t current_age);
 
 /**
  * get_cached_data: Get the data cached for an addr
@@ -70,7 +70,7 @@ uint8_t *get_cached_data(const PageCache *cache, uint64_t 
addr);
  * @current_age indicate the age of the page if the page is inserted into cache
  */
 int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata,
-                 uint64_t current_age);
+                 int64_t current_age);
 
 /**
  * cache_resize: resize the page cache. In case of size reduction the extra
diff --git a/page_cache.c b/page_cache.c
index 579330c..b32afdc 100644
--- a/page_cache.c
+++ b/page_cache.c
@@ -40,7 +40,7 @@ typedef struct CacheItem CacheItem;
 
 struct CacheItem {
     uint64_t it_addr;
-    uint64_t it_age;
+    int64_t it_age;
     uint8_t *it_data;
 };
 
@@ -140,7 +140,7 @@ uint8_t *get_cached_data(const PageCache *cache, uint64_t 
addr)
 }
 
 bool cache_is_cached(const PageCache *cache, uint64_t addr,
-                     uint64_t current_age)
+                     int64_t current_age)
 {
     CacheItem *it = NULL;
 
@@ -155,7 +155,7 @@ bool cache_is_cached(const PageCache *cache, uint64_t addr,
 }
 
 int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata,
-                 uint64_t current_age)
+                 int64_t current_age)
 {
 
     CacheItem *it = NULL;
-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]