mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +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;
|
||||
|
||||
/* Zero cross event notification information */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||
pid_t do_pid;
|
||||
struct sigevent do_event;
|
||||
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 */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||
for (opriv = priv->zu_open; opriv; opriv = opriv->do_flink)
|
||||
{
|
||||
/* 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,
|
||||
SI_QUEUE, &opriv->do_work);
|
||||
}
|
||||
#endif
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_ALL_SIGNALS
|
||||
case ZCIOC_REGISTER:
|
||||
{
|
||||
FAR struct sigevent *event =
|
||||
@@ -434,6 +438,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user