Subversion Repositories Kolibri OS

Rev

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

Rev 4065 Rev 4103
Line 265... Line 265...
265
 * This primitive may safely run concurrently with the _rcu list-mutation
265
 * This primitive may safely run concurrently with the _rcu list-mutation
266
 * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
266
 * primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
267
 */
267
 */
268
#define list_first_or_null_rcu(ptr, type, member) \
268
#define list_first_or_null_rcu(ptr, type, member) \
269
	({struct list_head *__ptr = (ptr); \
269
	({struct list_head *__ptr = (ptr); \
270
	  struct list_head __rcu *__next = list_next_rcu(__ptr); \
270
	  struct list_head *__next = ACCESS_ONCE(__ptr->next); \
-
 
271
	  likely(__ptr != __next) ? \
271
	  likely(__ptr != __next) ? container_of(__next, type, member) : NULL; \
272
		list_entry_rcu(__next, type, member) : NULL; \
272
	})
273
	})
Line 273... Line 274...
273
 
274
 
274
/**
275
/**
275
 * list_for_each_entry_rcu	-	iterate over rcu list of given type
276
 * list_for_each_entry_rcu	-	iterate over rcu list of given type