File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ osq_wait_next(struct optimistic_spin_queue *lock,
55
55
struct optimistic_spin_node * node ,
56
56
int old_cpu )
57
57
{
58
- struct optimistic_spin_node * next = NULL ;
59
58
int curr = encode_cpu (smp_processor_id ());
60
59
61
60
for (;;) {
@@ -66,7 +65,7 @@ osq_wait_next(struct optimistic_spin_queue *lock,
66
65
* will now observe @lock and will complete its
67
66
* unlock()/unqueue().
68
67
*/
69
- break ;
68
+ return NULL ;
70
69
}
71
70
72
71
/*
@@ -80,15 +79,15 @@ osq_wait_next(struct optimistic_spin_queue *lock,
80
79
* wait for a new @node->next from its Step-C.
81
80
*/
82
81
if (node -> next ) {
82
+ struct optimistic_spin_node * next ;
83
+
83
84
next = xchg (& node -> next , NULL );
84
85
if (next )
85
- break ;
86
+ return next ;
86
87
}
87
88
88
89
cpu_relax ();
89
90
}
90
-
91
- return next ;
92
91
}
93
92
94
93
bool osq_lock (struct optimistic_spin_queue * lock )
You can’t perform that action at this time.
0 commit comments