Bluetooth: samples/hci-uart: Make sure we yield in tx_fiber
Whenever the writer of a FIFO is an ISR and the reader a fiber it's important to make sure that we give the chance for other fibers to run in case the FIFO keeps getting new data from the ISR without ever running empty. Change-Id: I6b40461713d4acfdc6fcec13ff90c9697ff01935 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
6989bf88e1
commit
326901397f
|
@ -242,6 +242,11 @@ static void tx_fiber(int unused0, int unused1)
|
|||
buf = net_buf_get_timeout(&tx_queue, 0, TICKS_UNLIMITED);
|
||||
/* Pass buffer to the stack */
|
||||
bt_send(buf);
|
||||
|
||||
/* Give other fibers a chance to run if tx_queue keeps getting
|
||||
* new data all the time.
|
||||
*/
|
||||
fiber_yield();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue