mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
drivers/sensors: 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
784a469e02
commit
913aa99f05
@@ -81,10 +81,11 @@ struct zc_open_s
|
|||||||
volatile bool do_closing;
|
volatile bool do_closing;
|
||||||
|
|
||||||
/* Zero cross event notification information */
|
/* Zero cross event notification information */
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
pid_t do_pid;
|
pid_t do_pid;
|
||||||
struct sigevent do_event;
|
struct sigevent do_event;
|
||||||
struct sigwork_s do_work;
|
struct sigwork_s do_work;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -175,6 +176,7 @@ static void zerocross_interrupt(FAR const struct zc_lowerhalf_s *lower,
|
|||||||
|
|
||||||
/* Visit each opened reference and notify a zero cross event */
|
/* Visit each opened reference and notify a zero cross event */
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
for (opriv = priv->zu_open; opriv; opriv = opriv->do_flink)
|
for (opriv = priv->zu_open; opriv; opriv = opriv->do_flink)
|
||||||
{
|
{
|
||||||
/* Signal the waiter */
|
/* Signal the waiter */
|
||||||
@@ -183,6 +185,7 @@ static void zerocross_interrupt(FAR const struct zc_lowerhalf_s *lower,
|
|||||||
nxsig_notification(opriv->do_pid, &opriv->do_event,
|
nxsig_notification(opriv->do_pid, &opriv->do_event,
|
||||||
SI_QUEUE, &opriv->do_work);
|
SI_QUEUE, &opriv->do_work);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
}
|
}
|
||||||
@@ -415,6 +418,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
* failure with the errno value set appropriately.
|
* failure with the errno value set appropriately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||||
case ZCIOC_REGISTER:
|
case ZCIOC_REGISTER:
|
||||||
{
|
{
|
||||||
FAR struct sigevent *event =
|
FAR struct sigevent *event =
|
||||||
@@ -434,6 +438,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user