Revision 12c47213

b/xseg/xtypes/xlock.h
111 111

  
112 112
static inline unsigned long xlock_try_lock(struct xlock *lock, unsigned long who)
113 113
{
114
	return __sync_bool_compare_and_swap(&lock->owner, Noone, who);
114
	unsigned long owner;
115
	owner = *(volatile unsigned long *)(&lock->owner);
116
	if (owner == Noone)
117
		return __sync_bool_compare_and_swap(&lock->owner, Noone, who);
118
	return 0;
115 119
}
116 120

  
117 121
static inline void xlock_release(struct xlock *lock)

Also available in: Unified diff