• Home
  • Raw
  • Download

Lines Matching full:list

7 (``struct list_head`` in list.h).  One big advantage of this approach
9 the list macros. This document describes several applications of RCU,
13 Example 1: Read-mostly list: Deferred Destruction
17 all processes in the system. ``task_struct::tasks`` represents the list node that
18 links all the processes. The list can be traversed in parallel to any list
21 The traversal of the list is done using ``for_each_process()`` which is defined
30 The code traversing the list of all processes typically looks like::
38 The simplified code for removing a process from a task list is::
49 ``tasklist_lock`` writer lock protection, to remove the task from the list of
50 all tasks. The ``tasklist_lock`` prevents concurrent list additions/removals
51 from corrupting the list. Readers using ``for_each_process()`` are not protected
52 with the ``tasklist_lock``. To prevent readers from noticing changes in the list
55 ensures that any readers traversing the list will see valid ``p->tasks.next``
56 pointers and deletion/freeing can happen in parallel with traversal of the list.
87 list_for_each_entry(e, &audit_tsklist, list) {
97 Here the list is searched under the lock, but the lock is dropped before
99 on, the list may well have been modified. This makes sense, since if
111 list_for_each_entry_rcu(e, &audit_tsklist, list) {
123 become list_for_each_entry_rcu(). The **_rcu()** list-traversal primitives
130 struct list_head *list)
135 list_for_each_entry(e, list, list) {
137 list_del(&e->list);
147 struct list_head *list)
152 list_add(&entry->list, list);
154 list_add_tail(&entry->list, list);
163 struct list_head *list)
169 list_for_each_entry(e, list, list) {
171 list_del_rcu(&e->list);
180 struct list_head *list)
184 list_add_rcu(&entry->list, list);
186 list_add_tail_rcu(&entry->list, list);
199 The **_rcu()** list-manipulation primitives add memory barriers that are needed on
217 struct list_head *list,
226 list_for_each_entry(e, list, list) {
244 struct list_head *list,
251 list_for_each_entry(e, list, list) {
259 list_replace_rcu(&e->list, &ne->list);
313 list_for_each_entry_rcu(e, &audit_tsklist, list) {
339 struct list_head *list)
345 list_for_each_entry(e, list, list) {
348 list_del_rcu(&e->list);
365 during read-side list traversal if the object in concern is pending destruction
438 while objects are being added and removed to the list, sometimes the traversal
439 can step on an object that has been removed from the list. In this example, it
446 Read-mostly list-based data structures that can tolerate stale data are