Merge "neuron: block_client: Fix init loop"
This commit is contained in:
commit
304f2f125b
@ -178,8 +178,8 @@ static int protocol_block_client_thread(void *data)
|
|||||||
skb_req = NULL;
|
skb_req = NULL;
|
||||||
|
|
||||||
/* Wait for the channels to start */
|
/* Wait for the channels to start */
|
||||||
wakeup_mask = 0;
|
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
|
wakeup_mask = 0;
|
||||||
if (!channel_dev->max_size || !channel_dev->queue_length)
|
if (!channel_dev->max_size || !channel_dev->queue_length)
|
||||||
wakeup_mask |= CHANNEL_BIT(C_IN);
|
wakeup_mask |= CHANNEL_BIT(C_IN);
|
||||||
|
|
||||||
@ -192,10 +192,6 @@ static int protocol_block_client_thread(void *data)
|
|||||||
wait_event_killable(kdata->wait_q,
|
wait_event_killable(kdata->wait_q,
|
||||||
kthread_should_stop() ||
|
kthread_should_stop() ||
|
||||||
(kdata->wakeups & wakeup_mask));
|
(kdata->wakeups & wakeup_mask));
|
||||||
|
|
||||||
wakeup_mask &= ~xchg(&kdata->wakeups, 0);
|
|
||||||
/* flush shared variable to memory */
|
|
||||||
smp_mb__after_atomic();
|
|
||||||
}
|
}
|
||||||
if (kthread_should_stop())
|
if (kthread_should_stop())
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user