kernel: Change k_poll_signal api
k_poll_signal was being used by both, struct and function. Besides this being extremely error prone it is also a MISRA-C violation. Changing the function to contain a verb, since it performs an action and the struct will be a noun. This pattern must be formalized and followed and across the project. MISRA-C rules 5.7 and 5.9 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
dfbe03249d
commit
aecd4ecb8d
13 changed files with 32 additions and 32 deletions
|
@ -1507,7 +1507,7 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
|
|||
}
|
||||
k_fifo_init(&conn->tx_queue);
|
||||
k_fifo_init(&conn->tx_notify);
|
||||
k_poll_signal(&conn_change, 0);
|
||||
k_poll_signal_raise(&conn_change, 0);
|
||||
|
||||
sys_slist_init(&conn->channels);
|
||||
|
||||
|
@ -1536,7 +1536,7 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
|
|||
}
|
||||
|
||||
atomic_set_bit(conn->flags, BT_CONN_CLEANUP);
|
||||
k_poll_signal(&conn_change, 0);
|
||||
k_poll_signal_raise(&conn_change, 0);
|
||||
/* The last ref will be dropped by the tx_thread */
|
||||
} else if (old_state == BT_CONN_CONNECT) {
|
||||
/* conn->err will be set in this case */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue