Lines Matching refs:next
16 struct optimistic_spin_node *next, *prev;
45 * Get a stable @node->next pointer, either for unlock() or unqueue() purposes.
72 * We must xchg() the @node->next value, because if we were to
74 * @node->next might complete Step-A and think its @prev is
79 * wait for a new @node->next from its Step-C.
81 if (node->next) {
82 struct optimistic_spin_node *next;
84 next = xchg(&node->next, NULL);
85 if (next)
86 return next;
96 struct optimistic_spin_node *prev, *next;
101 node->next = NULL;
122 * prev->next = node next->prev = prev // unqueue-C
124 * Here 'node->prev' and 'next->prev' are the same variable and we need
129 WRITE_ONCE(prev->next, node);
154 * Undo our @prev->next assignment; this will make @prev's
155 * unlock()/unqueue() wait for a next pointer since @lock points to us
164 if (data_race(prev->next) == node &&
165 cmpxchg(&prev->next, node, NULL) == node)
186 * Step - B -- stabilize @next
188 * Similar to unlock(), wait for @node->next or move @lock from @node
192 next = osq_wait_next(lock, node, prev->cpu);
193 if (!next)
199 * @prev is stable because its still waiting for a new @prev->next
200 * pointer, @next is stable because our @node->next pointer is NULL and
204 WRITE_ONCE(next->prev, prev);
205 WRITE_ONCE(prev->next, next);
212 struct optimistic_spin_node *node, *next;
226 next = xchg(&node->next, NULL);
227 if (next) {
228 WRITE_ONCE(next->locked, 1);
232 next = osq_wait_next(lock, node, OSQ_UNLOCKED_VAL);
233 if (next)
234 WRITE_ONCE(next->locked, 1);