diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/rculist.h | 20 | ||||
| -rw-r--r-- | include/linux/rcupdate.h | 9 |
2 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 8089e35d47ac..f4b1001a4676 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -461,6 +461,26 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
| 461 | &(pos)->member)), typeof(*(pos)), member)) | 461 | &(pos)->member)), typeof(*(pos)), member)) |
| 462 | 462 | ||
| 463 | /** | 463 | /** |
| 464 | * hlist_for_each_entry_rcu_notrace - iterate over rcu list of given type (for tracing) | ||
| 465 | * @pos: the type * to use as a loop cursor. | ||
| 466 | * @head: the head for your list. | ||
| 467 | * @member: the name of the hlist_node within the struct. | ||
| 468 | * | ||
| 469 | * This list-traversal primitive may safely run concurrently with | ||
| 470 | * the _rcu list-mutation primitives such as hlist_add_head_rcu() | ||
| 471 | * as long as the traversal is guarded by rcu_read_lock(). | ||
| 472 | * | ||
| 473 | * This is the same as hlist_for_each_entry_rcu() except that it does | ||
| 474 | * not do any RCU debugging or tracing. | ||
| 475 | */ | ||
| 476 | #define hlist_for_each_entry_rcu_notrace(pos, head, member) \ | ||
| 477 | for (pos = hlist_entry_safe (rcu_dereference_raw_notrace(hlist_first_rcu(head)),\ | ||
| 478 | typeof(*(pos)), member); \ | ||
| 479 | pos; \ | ||
| 480 | pos = hlist_entry_safe(rcu_dereference_raw_notrace(hlist_next_rcu(\ | ||
| 481 | &(pos)->member)), typeof(*(pos)), member)) | ||
| 482 | |||
| 483 | /** | ||
| 464 | * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type | 484 | * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type |
| 465 | * @pos: the type * to use as a loop cursor. | 485 | * @pos: the type * to use as a loop cursor. |
| 466 | * @head: the head for your list. | 486 | * @head: the head for your list. |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 4ccd68e49b00..ddcc7826d907 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -640,6 +640,15 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 640 | 640 | ||
| 641 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ | 641 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ |
| 642 | 642 | ||
| 643 | /* | ||
| 644 | * The tracing infrastructure traces RCU (we want that), but unfortunately | ||
| 645 | * some of the RCU checks causes tracing to lock up the system. | ||
| 646 | * | ||
| 647 | * The tracing version of rcu_dereference_raw() must not call | ||
| 648 | * rcu_read_lock_held(). | ||
| 649 | */ | ||
| 650 | #define rcu_dereference_raw_notrace(p) __rcu_dereference_check((p), 1, __rcu) | ||
| 651 | |||
| 643 | /** | 652 | /** |
| 644 | * rcu_access_index() - fetch RCU index with no dereferencing | 653 | * rcu_access_index() - fetch RCU index with no dereferencing |
| 645 | * @p: The index to read | 654 | * @p: The index to read |
