Lines Matching refs:to

1 Using RCU to Protect Read-Mostly Arrays
4 Although RCU is more commonly used to protect linked lists, it can
5 also be used to protect arrays. Three situations are as follows:
13 Each of these three situations involves an RCU-protected pointer to an
14 array that is separately indexed. It might be tempting to consider use
15 of RCU to instead protect the index into an array, however, this use
20 arrays prove to be particularly valuable (which they have not thus far),
21 explicit cooperation from the compiler will be required to permit them
22 to be safely used.
33 to other array-of-list situations, such as radix trees.
38 Static arrays, where the data (rather than a pointer to the data) is
52 to map from semaphore, message-queue, and shared-memory IDs to the data
58 new ipc_id_ary, copies the old to the new portion of the new, initializes
59 the remainder of the new, updates the ids->entries pointer to point to
60 the new array, and invokes ipc_rcu_putref() to free up the old array.
61 Note that rcu_assign_pointer() is used to update the ids->entries pointer,
91 * Use rcu_assign_pointer() to make sure the memcpyed
102 and then, if the reference count has dropped to zero, uses call_rcu()
103 to free the array after a grace period has elapsed.
107 using rcu_dereference() to pick up the pointer to the array so
111 a simple check suffices. The pointer to the structure corresponding
112 to the desired IPC object is placed in "out", with NULL indicating
148 Answer to Quick Quiz:
152 One way to avoid this problem is to assign a seqlock for
153 each array entry rather than to the entire array.