|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] Re: [rfc] [patch] grant_entry.flags accessors
 
On 27 Jun 2006, at 17:11, Hollis Blanchard wrote:
 
In general I'm skeptical of blindly performing these operations on
unknown data. I think it's pretty clear that is not a good interface,
and what you're suggesting is codifying this behavior in the interface.
More practically speaking, I would be shocked if the Linux maintainers
would accept that sort of change to their atomic interfaces.
 
 
 I shouldn't imagine they'd mind the interface being made more 
permissive, with no performance loss for the common case and no extra 
API complexity, but anyway: How about add a 
ARCH_SUPPORTS_UNALIGNED_CMPXCHG and move special gnttab_cmpxchg() 
definition to gnttab.c, compilation dependent on that? Or rename the 
gnttab_cmpxchg to synch_cmpxchg_unaligned so at least the name is a bit 
more generic. It could then be used in other contexts.
 The Xen change is okay, but gnttab_clear_flag() would be a better 
function name if the function is really going to be gnttab specific. Or 
rename to clear_bit_unaligned and move definition to bitops.h. As with 
synch_cmpxchg_unaligned, the new function could then be used in other 
contexts.
 -- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
 | 
    | 
  
  
    |   | 
    |