Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions drivers/input/ajoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ struct ajoy_open_s

/* Joystick event notification information */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
pid_t ao_pid;
struct ajoy_notify_s ao_notify;
struct sigwork_s ao_work;
#endif

/* Poll event information */

Expand Down Expand Up @@ -173,8 +175,10 @@ static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv)

/* OR in the signal events */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
press |= opriv->ao_notify.an_press;
release |= opriv->ao_notify.an_release;
#endif
}

/* Enable/disable button interrupts */
Expand Down Expand Up @@ -271,6 +275,7 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)

/* Have any signal events occurred? */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if ((press & opriv->ao_notify.an_press) != 0 ||
(release & opriv->ao_notify.an_release) != 0)
{
Expand All @@ -280,6 +285,7 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
nxsig_notification(opriv->ao_pid, &opriv->ao_notify.an_event,
SI_QUEUE, &opriv->ao_work);
}
#endif
}

priv->au_sample = sample;
Expand Down Expand Up @@ -394,7 +400,9 @@ static int ajoy_close(FAR struct file *filep)

/* Cancel any pending notification */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
nxsig_cancel_notification(&opriv->ao_work);
#endif

/* And free the open structure */

Expand Down Expand Up @@ -545,6 +553,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* failure with the errno value set appropriately.
*/

#ifndef CONFIG_DISABLE_ALL_SIGNALS
case AJOYIOC_REGISTER:
{
FAR struct ajoy_notify_s *notify =
Expand All @@ -566,6 +575,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
#endif

default:
ierr("ERROR: Unrecognized command: %ld\n", cmd);
Expand Down
4 changes: 4 additions & 0 deletions drivers/input/button_upper.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ struct btn_open_s

/* Button event notification information */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
pid_t bo_pid;
struct btn_notify_s bo_notify;
struct sigwork_s bo_work;
#endif

/* Poll event information */

Expand Down Expand Up @@ -297,6 +299,7 @@ static void btn_sample(wdparm_t arg)

/* Have any signal events occurred? */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if ((press & opriv->bo_notify.bn_press) != 0 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nee d remove from btn_open_s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

(release & opriv->bo_notify.bn_release) != 0)
{
Expand All @@ -306,6 +309,7 @@ static void btn_sample(wdparm_t arg)
nxsig_notification(opriv->bo_pid, &opriv->bo_notify.bn_event,
SI_QUEUE, &opriv->bo_work);
}
#endif
}

priv->bu_sample = sample;
Expand Down
9 changes: 8 additions & 1 deletion drivers/input/djoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ struct djoy_open_s

/* Joystick event notification information */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
pid_t do_pid;
struct djoy_notify_s do_notify;
struct sigwork_s do_work;
#endif

/* Poll event information */

Expand Down Expand Up @@ -172,9 +174,10 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
release |= opriv->do_pollevents.dp_release;

/* OR in the signal events */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
press |= opriv->do_notify.dn_press;
release |= opriv->do_notify.dn_release;
#endif
}

/* Enable/disable button interrupts */
Expand Down Expand Up @@ -271,6 +274,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)

/* Have any signal events occurred? */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
if ((press & opriv->do_notify.dn_press) != 0 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need remove from djoy_open_s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

(release & opriv->do_notify.dn_release) != 0)
{
Expand All @@ -280,6 +284,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
nxsig_notification(opriv->do_pid, &opriv->do_notify.dn_event,
SI_QUEUE, &opriv->do_work);
}
#endif
}

priv->du_sample = sample;
Expand Down Expand Up @@ -541,6 +546,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* failure with the errno value set appropriately.
*/

#ifndef CONFIG_DISABLE_ALL_SIGNALS
case DJOYIOC_REGISTER:
{
FAR struct djoy_notify_s *notify =
Expand All @@ -562,6 +568,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
#endif

default:
ierr("ERROR: Unrecognized command: %d\n", cmd);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ioexpander/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ config DEV_GPIO_NPOLLWAITERS
config DEV_GPIO_NSIGNALS
int "Max number of signals"
default 1
depends on DEV_GPIO
depends on DEV_GPIO && !DISABLE_ALL_SIGNALS
---help---
The maximum number of signals that can be registered with the GPIO
driver
Expand Down
9 changes: 8 additions & 1 deletion drivers/lcd/ft80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ static int ft80x_fade(FAR struct ft80x_dev_s *priv,
static void ft80x_notify(FAR struct ft80x_dev_s *priv,
enum ft80x_notify_e id, int value)
{
#ifdef CONFIG_DISABLE_ALL_SIGNALS
UNUSED(priv);
UNUSED(id);
UNUSED(value);
#else
FAR struct ft80x_eventinfo_s *info = &priv->notify[id];

/* Are notifications enabled for this event? */
Expand All @@ -271,6 +276,7 @@ static void ft80x_notify(FAR struct ft80x_dev_s *priv,
info->event.sigev_value.sival_int = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need guard event in ft80x_dev_s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

nxsig_notification(info->pid, &info->event, SI_QUEUE, &info->work);
}
#endif
}

/****************************************************************************
Expand Down Expand Up @@ -997,6 +1003,7 @@ static int ft80x_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Returns: None
*/

#ifndef CONFIG_DISABLE_ALL_SIGNALS
case FT80X_IOC_EVENTNOTIFY:
{
FAR struct ft80x_notify_s *notify =
Expand Down Expand Up @@ -1059,7 +1066,7 @@ static int ft80x_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;

#endif
/* FT80X_IOC_FADE:
* Description: Change the backlight intensity with a controllable
* fade.
Expand Down
2 changes: 2 additions & 0 deletions drivers/lcd/ft80x.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ struct ft80x_dev_s

/* Event notification support */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
struct ft80x_eventinfo_s notify[FT80X_INT_NEVENTS];
#endif
};

/****************************************************************************
Expand Down
7 changes: 5 additions & 2 deletions drivers/modem/alt1250/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ if(CONFIG_MODEM_ALT1250)
altcom_errno.c
altmdm.c
altmdm_event.c
altmdm_spi.c
altmdm_timer.c)
altmdm_spi.c)

if(NOT CONFIG_DISABLE_ALL_SIGNALS)
list(APPEND SRCS altmdm_timer.c)
endif()

target_sources(drivers PRIVATE ${SRCS})
endif()
4 changes: 3 additions & 1 deletion drivers/modem/alt1250/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ CSRCS += altcom_errno.c
CSRCS += altmdm.c
CSRCS += altmdm_event.c
CSRCS += altmdm_spi.c
CSRCS += altmdm_timer.c
ifneq ($(CONFIG_DISABLE_ALL_SIGNALS),y)
CSRCS += altmdm_timer.c
endif
endif

DEPPATH += --dep-path modem$(DELIM)alt1250
Expand Down
3 changes: 2 additions & 1 deletion drivers/modem/alt1250/altmdm_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <signal.h>
#include <time.h>

#ifndef CONFIG_DISABLE_ALL_SIGNALS
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
Expand Down Expand Up @@ -109,5 +110,5 @@ int altmdm_timer_is_running(timer_t timerid);
****************************************************************************/

void altmdm_timer_stop(timer_t timerid);

#endif /* !CONFIG_DISABLE_ALL_SIGNALS */
#endif /* __DEVICES_MODEM_ALT1250_ALTMDM_TIMER_H */
2 changes: 2 additions & 0 deletions drivers/net/phy_notify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 6 additions & 1 deletion drivers/sensors/zerocross.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/****************************************************************************
Expand Down Expand Up @@ -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 */
Expand All @@ -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);
}
Expand Down Expand Up @@ -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 =
Expand All @@ -434,6 +438,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
#endif

default:
{
Expand Down
3 changes: 3 additions & 0 deletions drivers/timers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ if CAPTURE
config CAPTURE_NOTIFY
bool "Capture Notification Support"
default n
depends on !DISABLE_ALL_SIGNALS
---help---
Some hardware will support notification when a capture event
occurs. If the hardware will support notification, then this
Expand Down Expand Up @@ -239,6 +240,7 @@ endif # !RTC_DATETIME
config RTC_ALARM
bool "RTC Alarm Support"
default n
depends on !DISABLE_ALL_SIGNALS
---help---
Enable if the RTC hardware supports setting of an alarm. A callback
function will be executed when the alarm goes off.
Expand Down Expand Up @@ -269,6 +271,7 @@ config RTC_ARCH
config RTC_PERIODIC
bool "RTC Periodic Interrupts"
default n
depends on !DISABLE_ALL_SIGNALS
---help---
Add interrupt controls for RTCs that support periodic interrupts.

Expand Down
10 changes: 10 additions & 0 deletions drivers/timers/oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ struct oneshot_dev_s

/* Oneshot timer expiration notification information */

#ifndef CONFIG_DISABLE_ALL_SIGNALS
struct sigevent od_event; /* Signal info */
struct sigwork_s od_work; /* Signal work */
pid_t od_pid; /* PID to be notified */
#endif
};

/****************************************************************************
Expand All @@ -70,8 +72,10 @@ static ssize_t oneshot_write(FAR struct file *filep, FAR const char *buffer,
static int oneshot_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);

#ifndef CONFIG_DISABLE_ALL_SIGNALS
static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower,
FAR void *arg);
#endif

/****************************************************************************
* Private Data
Expand All @@ -95,6 +99,7 @@ static const struct file_operations g_oneshot_ops =
* Name: oneshot_callback
****************************************************************************/

#ifndef CONFIG_DISABLE_ALL_SIGNALS
static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower,
FAR void *arg)
{
Expand All @@ -107,6 +112,7 @@ static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower,
nxsig_notification(priv->od_pid, &priv->od_event, SI_QUEUE,
&priv->od_work);
}
#endif

/****************************************************************************
* Name: oneshot_read
Expand Down Expand Up @@ -193,6 +199,7 @@ static int oneshot_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Argument: A reference to struct oneshot_start_s
*/

#ifndef CONFIG_DISABLE_ALL_SIGNALS
case OSIOC_START:
{
FAR struct oneshot_start_s *start;
Expand Down Expand Up @@ -234,6 +241,7 @@ static int oneshot_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
nxsig_cancel_notification(&priv->od_work);
}
break;
#endif

/* OSIOC_CURRENT - Get the current time
* Argument: A reference to a struct timespec in
Expand Down Expand Up @@ -311,8 +319,10 @@ int oneshot_register(FAR const char *devname,

priv->od_lower = lower;

#ifndef CONFIG_DISABLE_ALL_SIGNALS
lower->callback = oneshot_callback;
lower->arg = priv;
#endif

nxmutex_init(&priv->od_lock);

Expand Down
Loading
Loading