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

Re: [Xen-devel] [PATCH] vmx-gdbserver-sstep.patch

Arun Sharma wrote:
+static inline int __vm_set_bit(unsigned long field, unsigned long mask)
+        unsigned long tmp;
+        int err = 0;
+        err |= __vmread(field, &tmp);
+        tmp |= mask;
+        err |= __vmwrite(field, tmp);

Wouldn't this be better:

  err = __vmread(field, &tmp);
  tmp |= mask;
  if (err == 0) err = __vmwrite(field, tmp);

(and similarly for __vm_clear_bit)?

David Hopwood <david.nospam.hopwood@xxxxxxxxxxxxxxxx>

Xen-devel mailing list



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