Bluetooth: controller: Move call to k_sem_give() out of the ISR
The execution time of k_sem_give() increased slightly recently, and since it was being called from the radio ISR this had an impact in the deadlines not being met. This change moves the actual call to k_sem_give() to a lower-priority job and thus out of the ISR to avoid its execution time affecting the ISR's timing. Change-id: I76c82df895c6daaffef52786b0c900ee15acb0aa Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no> Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
0b1e6fb231
commit
167eac7df3
1 changed files with 12 additions and 3 deletions
|
@ -5700,6 +5700,14 @@ static struct radio_pdu_node_rx *packet_rx_reserve_get(uint8_t count)
|
|||
return radio_pdu_node_rx;
|
||||
}
|
||||
|
||||
static void event_callback(void)
|
||||
{
|
||||
static struct work work_event_callback = { 0, 0, 0,
|
||||
WORK_TICKER_JOB0_IRQ, (work_fp) radio_event_callback, 0 };
|
||||
|
||||
work_schedule(&work_event_callback, 1);
|
||||
}
|
||||
|
||||
static void packet_rx_enqueue(void)
|
||||
{
|
||||
void *link;
|
||||
|
@ -5731,7 +5739,7 @@ static void packet_rx_enqueue(void)
|
|||
LL_ASSERT(link);
|
||||
|
||||
/* callback to trigger application action */
|
||||
radio_event_callback();
|
||||
event_callback();
|
||||
}
|
||||
|
||||
static void packet_tx_enqueue(uint8_t max)
|
||||
|
@ -5883,7 +5891,8 @@ static void pdu_node_tx_release(uint16_t handle,
|
|||
_radio.pkt_release[_radio.packet_release_last].node_tx = node_tx;
|
||||
_radio.packet_release_last = last;
|
||||
|
||||
radio_event_callback();
|
||||
/* callback to trigger application action */
|
||||
event_callback();
|
||||
}
|
||||
|
||||
static void connection_release(struct connection *conn)
|
||||
|
@ -6014,7 +6023,7 @@ static void terminate_ind_rx_enqueue(struct connection *conn, uint8_t reason)
|
|||
LL_ASSERT(link);
|
||||
|
||||
/* callback to trigger application action */
|
||||
radio_event_callback();
|
||||
event_callback();
|
||||
}
|
||||
|
||||
static uint32_t conn_update(struct connection *conn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue