Bluetooth: Controller: Fix deadlock in recv fiber
Controller's fiber is expected to read all enqueued events and data, hence wait on semaphore only after all events and data are read. Change-id: I0150f042b0ba91efa712b38903752b20198e5e6e Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
5860686013
commit
09b5998ced
1 changed files with 7 additions and 2 deletions
|
@ -227,6 +227,8 @@ static void native_recv_fiber(int unused0, int unused1)
|
|||
|
||||
retval = native_recv(len, buf);
|
||||
ASSERT(!retval);
|
||||
|
||||
fiber_yield();
|
||||
}
|
||||
|
||||
if (radio_pdu_node_rx) {
|
||||
|
@ -248,9 +250,12 @@ static void native_recv_fiber(int unused0, int unused1)
|
|||
radio_rx_fc_set(radio_pdu_node_rx->hdr.handle, 0);
|
||||
radio_pdu_node_rx->hdr.onion.next = 0;
|
||||
radio_rx_mem_release(&radio_pdu_node_rx);
|
||||
}
|
||||
|
||||
nano_fiber_sem_take(&nano_sem_native_recv, TICKS_UNLIMITED);
|
||||
fiber_yield();
|
||||
} else {
|
||||
nano_fiber_sem_take(&nano_sem_native_recv,
|
||||
TICKS_UNLIMITED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue