This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 1658ee4abf wireless/ieee802154: Replace direct access to semaphore value with nxsem_get_value 1658ee4abf is described below commit 1658ee4abfd3a93b29b5dde440e25ee76acc8b5a Author: Jukka Laitinen <jukka.laiti...@tii.ae> AuthorDate: Thu Apr 17 11:50:29 2025 +0300 wireless/ieee802154: Replace direct access to semaphore value with nxsem_get_value Use the defined interface to fetch the semaphore count in DEBUGASSERT Signed-off-by: Jukka Laitinen <jukka.laiti...@tii.ae> --- wireless/ieee802154/mac802154.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index 768df5e72a..09a59e5c66 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -2018,7 +2018,9 @@ static void mac802154_rxbeaconframe(FAR struct ieee802154_privmac_s *priv, } else if (priv->curr_op == MAC802154_OP_NONE) { - DEBUGASSERT(priv->opsem.semcount == 1); + int sval; + DEBUGASSERT(nxsem_get_value(&priv->opsem, &sval) == 0 + && sval == 1); nxsem_wait_uninterruptible(&priv->opsem); priv->curr_op = MAC802154_OP_AUTOEXTRACT; priv->curr_cmd = IEEE802154_CMD_DATA_REQ;