lkml.org 
[lkml]   [2011]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH 01/14] x86/ticketlock: clean up types and accessors
>  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?


\
 
 \ /
  Last update: 2011-01-11 18:27    [W:0.073 / U:7.688 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site