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

[Xen-devel] [PATCH][XEN] Use gnttab_clear_flag() to clear flags



We also add #define to catch offenders early.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>

---

diff -r 5f92043a3ab1 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Sun Aug 13 12:00:38 2006 -0400
+++ b/xen/common/grant_table.c  Sun Aug 13 12:46:53 2006 -0400
@@ -32,6 +32,13 @@
 #include <xen/guest_access.h>
 #include <acm/acm_hooks.h>
 
+/*
+ * This file uses a special method for clearing bit in the flags called:
+ *    gnttab_clear_flag()
+ * We redefine clear_bit() here to catch offenders early.
+ */
+#define clear_bit(flags, ptr) please_use_gnttab_clear_flag();
+
 /* The first to members of a grant entry are updated as a combined
  * pair.  The following union allows that to happen in an endian
  * neutral fashion. */
@@ -738,10 +745,10 @@ __release_grant_for_copy(
         act->pin -= GNTPIN_hstw_inc;
 
     if ( !(act->pin & GNTPIN_hstw_mask) && !readonly )
-        clear_bit(_GTF_writing, &sha->flags);
+        gnttab_clear_flag(_GTF_writing, &sha->flags);
 
     if ( !act->pin )
-        clear_bit(_GTF_reading, &sha->flags);
+        gnttab_clear_flag(_GTF_reading, &sha->flags);
     spin_unlock(&rd->grant_table->lock);
 }

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


 


Rackspace

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