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.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen 2025-04-17 11:50:29 +03:00 committed by Xiang Xiao
parent de12b6ae82
commit 1658ee4abf

View File

@ -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;