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

[Xen-changelog] New defines for misc get/put_page macros



ChangeSet 1.1713.2.4, 2005/06/17 09:39:22-06:00, djm@xxxxxxxxxxxxxxx

        New defines for misc get/put_page macros
        
        Signed-off-by Kevin Tian <Kevin.tian@xxxxxxxxx>



 mm.h |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)


diff -Nru a/xen/include/asm-ia64/mm.h b/xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h 2005-06-23 07:03:09 -04:00
+++ b/xen/include/asm-ia64/mm.h 2005-06-23 07:03:09 -04:00
@@ -169,8 +169,29 @@
 }
 
 /* No type info now */
-#define put_page_and_type(page) put_page((page))
-#define get_page_and_type(page, domain, type) get_page((page))
+#define put_page_type(page)
+#define get_page_type(page, type) 1
+static inline void put_page_and_type(struct pfn_info *page)
+{
+    put_page_type(page);
+    put_page(page);
+}
+
+
+static inline int get_page_and_type(struct pfn_info *page,
+                                    struct domain *domain,
+                                    u32 type)
+{
+    int rc = get_page(page, domain);
+
+    if ( likely(rc) && unlikely(!get_page_type(page, type)) )
+    {
+        put_page(page);
+        rc = 0;
+    }
+
+    return rc;
+}
 
 #define        set_machinetophys(_mfn, _pfn) do { } while(0);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.