/* Mark a cpu as interested in a lock. Returns the CPU's previous lock of interest, in case we got preempted by an interrupt.  */
static struct xen_spinlock* spinning_lock(struct xen_spinlock *xl)
/* Mark a cpu as interested in a lock. Returns the CPU's previous lock of interest, in case we got preempted by an interrupt.  */
static struct xen_spinlock* spinning_lock(struct xen_spinlock *xl)
{
	struct xen_spinlock *prev;
	prev = __get_cpu_var(lock_spinners);
	__get_cpu_var(lock_spinners) = xl;
	wmb();
	asm(LOCK_PREFIX " incw %0"
	    : "+m" (xl->spinners) : : "memory");
	return prev;
}