This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 913aa99f0573a18f2c3ef0724baf0563e3297a1c
Author: wangchengdong <[email protected]>
AuthorDate: Mon Jan 19 09:57:52 2026 +0800

    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 <[email protected]>
---
 drivers/sensors/zerocross.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/sensors/zerocross.c b/drivers/sensors/zerocross.c
index 22b1fea2f06..841b1d35f86 100644
--- a/drivers/sensors/zerocross.c
+++ b/drivers/sensors/zerocross.c
@@ -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:
         {

Reply via email to