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.
k_work_submit()
1 parent fd8ca83 commit 24c7ad3Copy full SHA for 24c7ad3
subsys/bluetooth/host/conn.c
@@ -387,16 +387,20 @@ static void wait_for_tx_work(struct bt_conn *conn)
387
tx_notify(conn);
388
} else {
389
struct k_work_sync sync;
390
+ int err;
391
392
/* API docs mention undefined behavior if syncing on work item
393
* from wq execution context.
394
*/
395
__ASSERT_NO_MSG(k_current_get() !=
396
k_work_queue_thread_get(&k_sys_work_q));
397
- k_work_submit(&conn->tx_complete_work);
398
+ err = k_work_submit(&conn->tx_complete_work);
399
+ __ASSERT(err >= 0, "couldn't submit (err %d)", err);
400
+
401
k_work_flush(&conn->tx_complete_work, &sync);
402
}
403
+ LOG_DBG("done");
404
#else
405
ARG_UNUSED(conn);
406
#endif /* CONFIG_BT_CONN_TX */
0 commit comments