Bluetooth: controller: Add branch prediction hints

Add branch prediction hints in critical control paths in the
code.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2020-09-29 15:11:35 +05:30 committed by Ioannis Glaropoulos
commit 3e2dc0d706
3 changed files with 3 additions and 3 deletions

View file

@ -183,7 +183,7 @@ static int prepare_cb(struct lll_prepare_param *prepare_param)
/* Check if stopped (on connection establishment race between LLL and
* ULL.
*/
if (lll_is_stop(lll)) {
if (unlikely(lll_is_stop(lll))) {
int err;
err = lll_hfclock_off();

View file

@ -132,7 +132,7 @@ static int prepare_cb(struct lll_prepare_param *p)
/* Check if stopped (on connection establishment race between LLL and
* ULL.
*/
if (lll_is_stop(lll)) {
if (unlikely(lll_is_stop(lll))) {
int err;
err = lll_hfclock_off();

View file

@ -1009,7 +1009,7 @@ void ull_conn_done(struct node_rx_event_done *done)
uint8_t force;
/* Skip if connection terminated by local host */
if (lll->handle == 0xFFFF) {
if (unlikely(lll->handle == 0xFFFF)) {
return;
}