We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fe2732 commit b2eb415Copy full SHA for b2eb415
subsys/bluetooth/host/att.c
@@ -721,7 +721,13 @@ static struct net_buf *bt_att_chan_create_pdu(struct bt_att_chan *chan, uint8_t
721
timeout = BT_ATT_TIMEOUT;
722
break;
723
default:
724
- if (k_current_get() == k_work_queue_thread_get(&k_sys_work_q)) {
+ k_tid_t current_thread = k_current_get();
725
+
726
+ if (current_thread == k_work_queue_thread_get(&k_sys_work_q)) {
727
+ /* No blocking in the sysqueue. */
728
+ timeout = K_NO_WAIT;
729
+ } else if (current_thread == att_handle_rsp_thread) {
730
+ /* Blocking would cause deadlock. */
731
timeout = K_NO_WAIT;
732
} else {
733
timeout = K_FOREVER;
0 commit comments