Subversion Repositories Kolibri OS

Rev

Rev 6295 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6295 Rev 6936
Line 297... Line 297...
297
		{ .__val = (__force typeof(x)) (val) }; \
297
		{ .__val = (__force typeof(x)) (val) }; \
298
	__write_once_size(&(x), __u.__c, sizeof(x));	\
298
	__write_once_size(&(x), __u.__c, sizeof(x));	\
299
	__u.__val;					\
299
	__u.__val;					\
300
})
300
})
Line -... Line 301...
-
 
301
 
-
 
302
/**
-
 
303
 * smp_cond_acquire() - Spin wait for cond with ACQUIRE ordering
-
 
304
 * @cond: boolean expression to wait for
-
 
305
 *
-
 
306
 * Equivalent to using smp_load_acquire() on the condition variable but employs
-
 
307
 * the control dependency of the wait to reduce the barrier on many platforms.
-
 
308
 *
-
 
309
 * The control dependency provides a LOAD->STORE order, the additional RMB
-
 
310
 * provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order,
-
 
311
 * aka. ACQUIRE.
-
 
312
 */
-
 
313
#define smp_cond_acquire(cond)	do {		\
-
 
314
	while (!(cond))				\
-
 
315
		cpu_relax();			\
-
 
316
	smp_rmb(); /* ctrl + rmb := acquire */	\
-
 
317
} while (0)
301
 
318
 
Line 302... Line 319...
302
#endif /* __KERNEL__ */
319
#endif /* __KERNEL__ */
Line 303... Line 320...
303
 
320