Remove final remaining CONFIG_DISABLE_SIGNALS and CONFIG_DISABLE_SIGNAL

This commit is contained in:
Juha Niskanen
2021-05-10 21:05:32 +03:00
committed by Alan Carvalho de Assis
parent 8af9d39667
commit abcb67a292
11 changed files with 9 additions and 109 deletions
+6 -20
View File
@@ -132,14 +132,12 @@ extern int fw_pm_sleepcpu(int cpuid, int mode);
* Private Types
****************************************************************************/
#ifndef CONFIG_DISABLE_SIGNAL
struct cxd56_gnss_sig_s
{
uint8_t enable;
int pid;
FAR struct cxd56_gnss_signal_info_s info;
};
#endif
struct cxd56_gnss_shared_info_s
{
@@ -163,8 +161,7 @@ struct cxd56_gnss_dev_s
struct file cepfp;
FAR void * cepbuf;
FAR struct pollfd *fds[CONFIG_CXD56_GNSS_NPOLLWAITERS];
#if !defined(CONFIG_DISABLE_SIGNAL) && \
(CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0)
#if CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0
struct cxd56_gnss_sig_s sigs[CONFIG_CXD56_GNSS_NSIGNALRECEIVERS];
#endif
struct cxd56_gnss_shared_info_s shared_info;
@@ -1459,8 +1456,7 @@ static int cxd56_gnss_set_signal(FAR struct file *filep, unsigned long arg)
{
int ret = 0;
#if !defined(CONFIG_DISABLE_SIGNAL) && \
(CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0)
#if CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0
FAR struct inode *inode;
FAR struct cxd56_gnss_dev_s *priv;
FAR struct cxd56_gnss_signal_setting_s *setting;
@@ -1533,10 +1529,7 @@ static int cxd56_gnss_set_signal(FAR struct file *filep, unsigned long arg)
_success:
_err:
nxsem_post(&priv->devsem);
#endif
/* if !defined(CONFIG_DISABLE_SIGNAL) &&
* (CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0)
*/
#endif /* CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0 */
return ret;
}
@@ -2257,9 +2250,6 @@ static void cxd56_gnss_read_backup_file(FAR int *retval)
cxd56_cpu1sigsend(CXD56_CPU1_DATA_TYPE_BKUPFILE, 0);
}
#if !defined(CONFIG_DISABLE_SIGNAL) && \
(CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0)
/****************************************************************************
* Name: cxd56_gnss_common_signalhandler
*
@@ -2276,6 +2266,7 @@ static void cxd56_gnss_read_backup_file(FAR int *retval)
*
****************************************************************************/
#if CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0
static void cxd56_gnss_common_signalhandler(uint32_t data,
FAR void *userdata)
{
@@ -2312,11 +2303,7 @@ static void cxd56_gnss_common_signalhandler(uint32_t data,
nxsem_post(&priv->devsem);
}
#endif
/* if !defined(CONFIG_DISABLE_SIGNAL) &&
* (CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0)
*/
#endif /* CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0 */
/****************************************************************************
* Name: cxd56_gnss_default_sighandler
@@ -2418,8 +2405,7 @@ static void cxd56_gnss_default_sighandler(uint32_t data, FAR void *userdata)
nxsem_post(&priv->devsem);
#if !defined(CONFIG_DISABLE_SIGNAL) && \
(CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0)
#if CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0
cxd56_gnss_common_signalhandler(data, userdata);
#endif
}
-2
View File
@@ -239,7 +239,6 @@ static int icc_irqhandler(int cpuid, uint32_t word[2])
* process.
*/
#ifndef CONFIG_DISABLE_SIGNAL
if (priv->pid != INVALID_PROCESS_ID)
{
union sigval value;
@@ -247,7 +246,6 @@ static int icc_irqhandler(int cpuid, uint32_t word[2])
value.sival_ptr = priv->sigdata;
nxsig_queue(priv->pid, priv->signo, value);
}
#endif
return OK;
}
+2 -39
View File
@@ -196,10 +196,9 @@ struct cxd56_scudev_s
uint8_t oneshot; /* Bitmap for Oneshots */
sem_t oneshotwait[3]; /* Semaphore for wait oneshot sequence is done */
#ifndef CONFIG_DISABLE_SIGNAL
struct ev_notify_s event[3]; /* MATHFUNC event notify */
struct wm_notify_s wm[14]; /* Watermark notify */
#endif
int currentreq;
};
@@ -274,7 +273,6 @@ static void seq_setdecimation(int wid, uint8_t ratio, uint8_t leveladj,
uint8_t forcethrough);
static int seq_setwatermark(FAR struct seq_s *seq, int fifoid,
FAR struct scufifo_wm_s *wm);
#ifndef CONFIG_DISABLE_SIGNAL
static void convert_firsttimestamp(struct scutimestamp_s *tm,
uint16_t interval, uint16_t sample,
uint16_t adjust);
@@ -282,7 +280,6 @@ static void latest_timestamp(struct scufifo_s *fifo, uint32_t interval,
struct scutimestamp_s *tm, uint16_t *samples);
static void seq_gettimestamp(struct scufifo_s *fifo,
struct scutimestamp_s *tm);
#endif
static int seq_oneshot(int bustype, int slave, FAR uint16_t *inst,
uint32_t nr_insts, FAR uint8_t *buffer, int len);
@@ -1478,10 +1475,8 @@ static void seq_handlefifointr(FAR struct cxd56_scudev_s *priv,
{
uint32_t bit;
int i;
#ifndef CONFIG_DISABLE_SIGNAL
struct wm_notify_s *notify;
union sigval value;
#endif
if ((intr & 0x007ffe00) == 0)
{
@@ -1498,7 +1493,6 @@ static void seq_handlefifointr(FAR struct cxd56_scudev_s *priv,
putreg32(bit, SCU_INT_CLEAR_MAIN);
#ifndef CONFIG_DISABLE_SIGNAL
notify = &priv->wm[i];
if (notify->ts)
@@ -1510,7 +1504,6 @@ static void seq_handlefifointr(FAR struct cxd56_scudev_s *priv,
value.sival_ptr = notify->ts;
nxsig_queue(notify->pid, notify->signo, value);
#endif
}
}
}
@@ -1530,10 +1523,8 @@ static void seq_handlemathfintr(FAR struct cxd56_scudev_s *priv,
uint32_t bit;
uint32_t rise;
uint32_t fall;
#ifndef CONFIG_DISABLE_SIGNAL
struct ev_notify_s *notify;
int detected = 0;
#endif
rise = (intr >> 6) & 0x7;
fall = (intr >> 28) & 0x7;
@@ -1545,16 +1536,14 @@ static void seq_handlemathfintr(FAR struct cxd56_scudev_s *priv,
for (i = 0, bit = 1; i < 3; i++, bit <<= 1)
{
#ifndef CONFIG_DISABLE_SIGNAL
notify = &priv->event[i];
#endif
/* Detect rise event */
if (rise & bit)
{
putreg32(bit << 6, SCU_INT_CLEAR_MAIN);
#ifndef CONFIG_DISABLE_SIGNAL
/* Get rise event occurred timestamp */
if (notify->arg)
@@ -1567,7 +1556,6 @@ static void seq_handlemathfintr(FAR struct cxd56_scudev_s *priv,
}
detected = 1;
#endif
}
/* Detect fall event */
@@ -1576,7 +1564,6 @@ static void seq_handlemathfintr(FAR struct cxd56_scudev_s *priv,
{
putreg32(bit << 28, SCU_INT_CLEAR_MAIN);
#ifndef CONFIG_DISABLE_SIGNAL
/* Get fall event occurred timestamp */
if (notify->arg)
@@ -1589,10 +1576,8 @@ static void seq_handlemathfintr(FAR struct cxd56_scudev_s *priv,
}
detected = 1;
#endif
}
#ifndef CONFIG_DISABLE_SIGNAL
if (detected)
{
union sigval value;
@@ -1603,7 +1588,6 @@ static void seq_handlemathfintr(FAR struct cxd56_scudev_s *priv,
nxsig_queue(notify->pid, notify->signo, value);
detected = 0;
}
#endif
}
}
@@ -2232,9 +2216,7 @@ static int seq_seteventnotifier(FAR struct scufifo_s *fifo,
int riseint;
int fallint;
int mid;
#ifndef CONFIG_DISABLE_SIGNAL
irqstate_t flags;
#endif
DEBUGASSERT(fifo && ev);
@@ -2247,7 +2229,6 @@ static int seq_seteventnotifier(FAR struct scufifo_s *fifo,
mid = fifo->mid;
#ifndef CONFIG_DISABLE_SIGNAL
/* Save signal number and target PID */
flags = enter_critical_section();
@@ -2256,7 +2237,6 @@ static int seq_seteventnotifier(FAR struct scufifo_s *fifo,
priv->event[mid].arg = ev->arg;
priv->event[mid].fifo = fifo;
leave_critical_section(flags);
#endif
thresh = count0 = count1 = delaysample = 0;
riseint = fallint = 0;
@@ -2306,8 +2286,6 @@ static int seq_seteventnotifier(FAR struct scufifo_s *fifo,
return OK;
}
#ifndef CONFIG_DISABLE_SIGNAL
/****************************************************************************
* Name: seq_setwatermark
*
@@ -2481,9 +2459,6 @@ static void seq_gettimestamp(struct scufifo_s *fifo,
convert_firsttimestamp(tm, interval, sample, adjust);
}
#else
#define seq_setwatermark(seq, fifoid, wm) (-ENOSYS)
#endif
/****************************************************************************
* Name: seq_setfifomode
@@ -2498,22 +2473,16 @@ static void seq_setfifomode(FAR struct seq_s *seq, int fifoid, int enable)
FAR struct scufifo_s *fifo = seq_getfifo(seq, fifoid);
uint32_t val;
irqstate_t flags;
#ifndef CONFIG_DISABLE_SIGNAL
FAR struct cxd56_scudev_s *priv = &g_scudev;
FAR struct wm_notify_s *notify = &priv->wm[fifo->rid];
bool iswtmk = false;
#endif
DEBUGASSERT(fifo);
scuinfo("FIFO mode %d wid %d\n", enable, fifo->wid);
#ifndef CONFIG_DISABLE_SIGNAL
if (notify->ts)
{
iswtmk = true;
}
#endif
flags = enter_critical_section();
@@ -2535,15 +2504,12 @@ static void seq_setfifomode(FAR struct seq_s *seq, int fifoid, int enable)
val = 0x1 << (fifo->rid + 9);
putreg32(val, SCU_INT_DISABLE_ERR_0);
#ifndef CONFIG_DISABLE_SIGNAL
/* disable almostfull interrupt */
if (iswtmk)
{
putreg32(val, SCU_INT_DISABLE_MAIN);
}
#endif
}
else
{
@@ -2557,8 +2523,6 @@ static void seq_setfifomode(FAR struct seq_s *seq, int fifoid, int enable)
val = 0x1 << (fifo->rid + 9);
putreg32(val, SCU_INT_ENABLE_ERR_0);
#ifndef CONFIG_DISABLE_SIGNAL
/* enable almostfull interrupt */
if (iswtmk)
@@ -2566,7 +2530,6 @@ static void seq_setfifomode(FAR struct seq_s *seq, int fifoid, int enable)
val = 0x1 << (fifo->rid + 9);
putreg32(val, SCU_INT_ENABLE_MAIN);
}
#endif
}
leave_critical_section(flags);
@@ -67,7 +67,6 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
struct tcb_s *rtcb = this_task();
uint32_t regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
@@ -127,5 +126,4 @@ void up_sigdeliver(void)
board_autoled_off(LED_SIGNAL);
up_fullcontextrestore(regs);
#endif
}
-2
View File
@@ -172,7 +172,6 @@ struct xcptcontext
* to be processed.
*/
#ifndef CONFIG_DISABLE_SIGNALS
void *sigdeliver; /* Actual type is sig_deliver_t */
/* These are saved copies of instruction pointer and EFLAGS used during
@@ -182,7 +181,6 @@ struct xcptcontext
uint64_t saved_rip;
uint64_t saved_rflags;
uint64_t saved_rsp;
#endif
/* Register save area */
@@ -35,20 +35,6 @@
#include "up_internal.h"
#include "up_arch.h"
#ifndef CONFIG_DISABLE_SIGNALS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -179,5 +165,3 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
}
}
}
#endif /* !CONFIG_DISABLE_SIGNALS */
+1 -18
View File
@@ -37,20 +37,6 @@
#include "up_internal.h"
#include "up_arch.h"
#ifndef CONFIG_DISABLE_SIGNALS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -72,7 +58,7 @@ void up_sigdeliver(void)
uint64_t regs_area[XCPTCONTEXT_REGS + 2];
uint64_t *regs;
/* align regs to 16byte boundary for SSE instrucitons */
/* Align regs to 16 byte boundary for SSE instructions. */
regs = (uint64_t *)(((uint64_t)(regs_area) + 15) & (~(uint64_t)15));
@@ -144,6 +130,3 @@ void up_sigdeliver(void)
board_autoled_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
#endif /* !CONFIG_DISABLE_SIGNALS */
@@ -100,9 +100,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
/* Signal handler trampoline */
#ifndef CONFIG_DISABLE_SIGNALS
.signal_handler = up_signal_handler,
#endif
/* User-space work queue support (declared in include/nuttx/wqueue.h) */
@@ -413,9 +413,6 @@ Configuration Directories
CONFIG_LPC17_40_GPIOIRQ=y : GPIO interrupt support
CONFIG_LPC17_40_SSP1=y : Enable support for SSP1
RTOS Features:
CONFIG_DISABLE_SIGNALS=n : Signals are required
Library Support:
CONFIG_SCHED_WORKQUEUE=y : Work queue support required
@@ -100,9 +100,7 @@ const struct userspace_s userspace __attribute__ ((section (".userspace"))) =
/* Signal handler trampoline */
#ifndef CONFIG_DISABLE_SIGNALS
.signal_handler = up_signal_handler,
#endif
/* User-space work queue support (declared in include/nuttx/wqueue.h) */
@@ -309,9 +309,6 @@ CONFIGURATION
CONFIG_GPIO_IRQ=y : GPIO interrupt support
CONFIG_LPC17_SSP1=y : Enable support for SSP1
RTOS Features:
CONFIG_DISABLE_SIGNALS=n : Signals are required
Library Support:
CONFIG_SCHED_WORKQUEUE=y : Work queue support required