mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
drivers/xbee: 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:
committed by
Xiang Xiao
parent
800d39cdbf
commit
1608223eb3
@@ -136,10 +136,12 @@ struct xbeenet_driver_s
|
|||||||
|
|
||||||
/* MAC Service notification information */
|
/* MAC Service notification information */
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
bool xd_notify_registered;
|
bool xd_notify_registered;
|
||||||
pid_t xd_notify_pid;
|
pid_t xd_notify_pid;
|
||||||
struct sigevent xd_notify_event;
|
struct sigevent xd_notify_event;
|
||||||
struct sigwork_s xd_notify_work;
|
struct sigwork_s xd_notify_work;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -410,12 +412,14 @@ static int xbeenet_notify(FAR struct xbee_maccb_s *maccb,
|
|||||||
nxsem_post(&priv->xd_eventsem);
|
nxsem_post(&priv->xd_eventsem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
if (priv->xd_notify_registered)
|
if (priv->xd_notify_registered)
|
||||||
{
|
{
|
||||||
priv->xd_notify_event.sigev_value.sival_int = primitive->type;
|
priv->xd_notify_event.sigev_value.sival_int = primitive->type;
|
||||||
nxsig_notification(priv->xd_notify_pid, &priv->xd_notify_event,
|
nxsig_notification(priv->xd_notify_pid, &priv->xd_notify_event,
|
||||||
SI_QUEUE, &priv->xd_notify_work);
|
SI_QUEUE, &priv->xd_notify_work);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
nxmutex_unlock(&priv->xd_lock);
|
nxmutex_unlock(&priv->xd_lock);
|
||||||
return OK;
|
return OK;
|
||||||
@@ -940,6 +944,7 @@ static int xbeenet_ioctl(FAR struct net_driver_s *dev, int cmd,
|
|||||||
* appropriately.
|
* appropriately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
case MAC802154IOC_NOTIFY_REGISTER:
|
case MAC802154IOC_NOTIFY_REGISTER:
|
||||||
{
|
{
|
||||||
/* Save the notification events */
|
/* Save the notification events */
|
||||||
@@ -950,6 +955,7 @@ static int xbeenet_ioctl(FAR struct net_driver_s *dev, int cmd,
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MAC802154IOC_GET_EVENT:
|
case MAC802154IOC_GET_EVENT:
|
||||||
{
|
{
|
||||||
@@ -1293,7 +1299,10 @@ int xbee_netdev_register(XBEEHANDLE xbee)
|
|||||||
sq_init(&priv->primitive_queue);
|
sq_init(&priv->primitive_queue);
|
||||||
|
|
||||||
priv->xd_enableevents = false;
|
priv->xd_enableevents = false;
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
priv->xd_notify_registered = false;
|
priv->xd_notify_registered = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialize the XBee MAC callbacks */
|
/* Initialize the XBee MAC callbacks */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user