Skip to content

Commit 92ad351

Browse files
Bjarki Arge Andreasenfabiobaltieri
authored andcommitted
modem: modem_cmux: Use k_event_test instead of K_NO_WAIT
This commit replaces the k_event_wait calls using K_NO_WAIT with k_event_test. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 79e6c84 commit 92ad351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/modem/modem_cmux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ int modem_cmux_connect_async(struct modem_cmux *cmux)
960960
{
961961
__ASSERT_NO_MSG(cmux->pipe != NULL);
962962

963-
if (k_event_wait(&cmux->event, MODEM_CMUX_EVENT_CONNECTED_BIT, false, K_NO_WAIT)) {
963+
if (k_event_test(&cmux->event, MODEM_CMUX_EVENT_CONNECTED_BIT)) {
964964
return -EALREADY;
965965
}
966966

@@ -992,7 +992,7 @@ int modem_cmux_disconnect_async(struct modem_cmux *cmux)
992992
{
993993
__ASSERT_NO_MSG(cmux->pipe != NULL);
994994

995-
if (k_event_wait(&cmux->event, MODEM_CMUX_EVENT_DISCONNECTED_BIT, false, K_NO_WAIT)) {
995+
if (k_event_test(&cmux->event, MODEM_CMUX_EVENT_DISCONNECTED_BIT)) {
996996
return -EALREADY;
997997
}
998998

0 commit comments

Comments
 (0)