Re: [Xen-devel] [PATCH 01/14] x86/ticketlock: clean up types andaccessors

From: Konrad Rzeszutek Wilk
Date: Tue Jan 11 2011 - 12:25:07 EST


> static inline int __ticket_spin_is_locked(arch_spinlock_t *lock)
> {
> - int tmp = ACCESS_ONCE(lock->slock);
> + struct __raw_tickets tmp = ACCESS_ONCE(lock->tickets);
>
> - return !!(((tmp >> TICKET_SHIFT) ^ tmp) & ((1 << TICKET_SHIFT) - 1));
> + return !!(tmp.tail ^ tmp.head);

Does it make sense to mask it here it here with TICKET_MASK as it was done before?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/