drivers/net: remove nxsig_notification when signal support is disabled

When all signals are disabled, nxsig_notification is not available and
should not be invoked. Remove the call to avoid build and runtime issues
in no-signal configurations.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2026-01-19 09:55:53 +08:00
committed by Xiang Xiao
parent 9c80011c53
commit 784a469e02
3 changed files with 14 additions and 0 deletions
+2
View File
@@ -226,12 +226,14 @@ static int phy_handler(int irq, FAR void *context, FAR void *arg)
/* Signal the client that the PHY has something interesting to say to us */
#ifndef CONFIG_DISABLE_ALL_SIGNALS
ret = nxsig_notification(client->pid, &client->event,
SI_QUEUE, &client->work);
if (ret < 0)
{
phyerr("ERROR: nxsig_notification failed: %d\n", ret);
}
#endif
return OK;
}
+6
View File
@@ -110,10 +110,12 @@ struct mac802154_chardevice_s
/* MAC Service notification information */
#ifndef CONFIG_DISABLE_ALL_SIGNALS
bool md_notify_registered;
pid_t md_notify_pid;
struct sigevent md_notify_event;
struct sigwork_s md_notify_work;
#endif
};
/****************************************************************************
@@ -575,6 +577,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int cmd,
* failure with the errno value set appropriately.
*/
#ifndef CONFIG_DISABLE_ALL_SIGNALS
case MAC802154IOC_NOTIFY_REGISTER:
{
/* Save the notification events */
@@ -586,6 +589,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int cmd,
ret = OK;
}
break;
#endif
case MAC802154IOC_GET_EVENT:
{
@@ -721,12 +725,14 @@ static int mac802154dev_notify(FAR struct mac802154_maccb_s *maccb,
nxsem_post(&dev->geteventsem);
}
#ifndef CONFIG_DISABLE_ALL_SIGNALS
if (dev->md_notify_registered)
{
dev->md_notify_event.sigev_value.sival_int = primitive->type;
nxsig_notification(dev->md_notify_pid, &dev->md_notify_event,
SI_QUEUE, &dev->md_notify_work);
}
#endif
nxmutex_unlock(&dev->md_lock);
return OK;
+6
View File
@@ -147,10 +147,12 @@ struct macnet_driver_s
/* MAC Service notification information */
#ifndef CONFIG_DISABLE_ALL_SIGNALS
bool md_notify_registered;
pid_t md_notify_pid;
struct sigevent md_notify_event;
struct sigwork_s md_notify_work;
#endif
#ifdef CONFIG_NET_6LOWPAN
struct sixlowpan_reassbuf_s md_iobuffer;
@@ -378,12 +380,14 @@ static int macnet_notify(FAR struct mac802154_maccb_s *maccb,
nxsem_post(&priv->md_eventsem);
}
#ifndef CONFIG_DISABLE_ALL_SIGNALS
if (priv->md_notify_registered)
{
priv->md_notify_event.sigev_value.sival_int = primitive->type;
nxsig_notification(priv->md_notify_pid, &priv->md_notify_event,
SI_QUEUE, &priv->md_notify_work);
}
#endif
nxmutex_unlock(&priv->md_lock);
return OK;
@@ -933,6 +937,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd,
* errno value set appropriately.
*/
#ifndef CONFIG_DISABLE_ALL_SIGNALS
case MAC802154IOC_NOTIFY_REGISTER:
{
/* Save the notification events */
@@ -943,6 +948,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd,
ret = OK;
}
break;
#endif
case MAC802154IOC_GET_EVENT:
{