From e1202d2ed33a257cd6d812fde8c3a77a4d7c1d01 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 24 Aug 2018 06:58:30 -0600 Subject: [PATCH] Replace all ASSERT with DEBUGASSERT to save the code space --- arch/arm/src/arm/up_blocktask.c | 4 ++-- arch/arm/src/arm/up_sigdeliver.c | 2 +- arch/arm/src/arm/up_unblocktask.c | 4 ++-- arch/arm/src/armv6-m/up_blocktask.c | 4 ++-- arch/arm/src/armv6-m/up_sigdeliver.c | 2 +- arch/arm/src/armv6-m/up_unblocktask.c | 4 ++-- arch/arm/src/armv7-a/arm_blocktask.c | 4 ++-- arch/arm/src/armv7-a/arm_doirq.c | 4 ++-- arch/arm/src/armv7-a/arm_sigdeliver.c | 2 +- arch/arm/src/armv7-a/arm_unblocktask.c | 4 ++-- arch/arm/src/armv7-m/up_blocktask.c | 4 ++-- arch/arm/src/armv7-m/up_sigdeliver.c | 2 +- arch/arm/src/armv7-m/up_unblocktask.c | 4 ++-- arch/arm/src/armv7-r/arm_blocktask.c | 4 ++-- arch/arm/src/armv7-r/arm_sigdeliver.c | 2 +- arch/arm/src/armv7-r/arm_unblocktask.c | 4 ++-- arch/arm/src/efm32/efm32_i2c.c | 6 +++--- arch/arm/src/efm32/efm32_pwm.c | 4 ++-- arch/arm/src/imxrt/imxrt_enet.c | 2 +- arch/arm/src/kinetis/kinetis_enet.c | 2 +- arch/arm/src/lc823450/lc823450_clockconfig.c | 2 +- arch/arm/src/lc823450/lc823450_i2c.c | 4 ++-- arch/arm/src/lc823450/lc823450_i2s.c | 10 +++++----- arch/arm/src/lc823450/lc823450_irq.c | 2 +- arch/arm/src/lc823450/lc823450_mtd.c | 6 +++--- arch/arm/src/lc823450/lc823450_sdc.c | 4 ++-- arch/arm/src/lc823450/lc823450_sddrv_dep.c | 2 +- arch/arm/src/lc823450/lc823450_syscontrol.c | 6 +++--- arch/arm/src/lc823450/lc823450_timer.c | 2 +- arch/arm/src/lpc43xx/lpc43_timer.c | 2 +- arch/arm/src/sam34/sam_tc.c | 2 +- arch/arm/src/sam34/sam_wdt.c | 2 +- arch/arm/src/sama5/sam_adc.c | 4 ++-- arch/arm/src/sama5/sam_ssc.c | 2 +- arch/arm/src/sama5/sam_tsd.c | 2 +- arch/arm/src/sama5/sam_twi.c | 2 +- arch/arm/src/samd2l2/sam_i2c_master.c | 2 +- arch/arm/src/samd5e5/sam_i2c_master.c | 2 +- arch/arm/src/samv7/sam_ssc.c | 2 +- arch/arm/src/stm32/stm32_dma2d.c | 2 +- arch/arm/src/stm32/stm32_i2c.c | 6 +++--- arch/arm/src/stm32/stm32_i2c_alt.c | 6 +++--- arch/arm/src/stm32/stm32_i2s.c | 2 +- arch/arm/src/stm32/stm32_ltdc.c | 2 +- arch/arm/src/stm32/stm32_tickless.c | 8 ++++---- arch/arm/src/stm32/stm32f30xxx_i2c.c | 6 +++--- arch/arm/src/stm32f0/stm32f0_i2c.c | 6 +++--- arch/arm/src/stm32f7/stm32_dma2d.c | 2 +- arch/arm/src/stm32f7/stm32_i2c.c | 6 +++--- arch/arm/src/stm32f7/stm32_ltdc.c | 2 +- arch/arm/src/stm32l4/stm32l4_i2c.c | 6 +++--- arch/arm/src/stm32l4/stm32l4_lptim.c | 4 ++-- arch/arm/src/stm32l4/stm32l4_sai.c | 4 ++-- arch/arm/src/tiva/tiva_i2c.c | 2 +- arch/arm/src/tms570/tms570_boot.c | 8 ++++---- arch/arm/src/tms570/tms570_clockconfig.c | 2 +- arch/avr/src/avr/up_blocktask.c | 2 +- arch/avr/src/avr/up_sigdeliver.c | 2 +- arch/avr/src/avr/up_unblocktask.c | 2 +- arch/avr/src/avr32/up_blocktask.c | 2 +- arch/avr/src/avr32/up_sigdeliver.c | 2 +- arch/avr/src/avr32/up_unblocktask.c | 2 +- arch/hc/src/common/up_blocktask.c | 2 +- arch/hc/src/common/up_unblocktask.c | 4 ++-- arch/hc/src/m9s12/m9s12_gpio.c | 6 +++--- arch/mips/src/mips32/up_blocktask.c | 4 ++-- arch/mips/src/mips32/up_sigdeliver.c | 2 +- arch/mips/src/mips32/up_unblocktask.c | 4 ++-- arch/misoc/src/lm32/lm32_blocktask.c | 4 ++-- arch/misoc/src/lm32/lm32_sigdeliver.c | 2 +- arch/misoc/src/lm32/lm32_unblocktask.c | 4 ++-- arch/or1k/src/common/up_blocktask.c | 4 ++-- arch/or1k/src/common/up_unblocktask.c | 2 +- arch/renesas/src/common/up_blocktask.c | 4 ++-- arch/renesas/src/common/up_unblocktask.c | 4 ++-- arch/renesas/src/m16c/m16c_sigdeliver.c | 2 +- arch/renesas/src/sh1/sh1_sigdeliver.c | 2 +- arch/risc-v/src/nr5m100/nr5_timer.c | 16 ++++++++-------- arch/risc-v/src/rv32im/up_blocktask.c | 4 ++-- arch/risc-v/src/rv32im/up_sigdeliver.c | 2 +- arch/risc-v/src/rv32im/up_unblocktask.c | 4 ++-- arch/sim/src/up_blocktask.c | 4 ++-- arch/sim/src/up_unblocktask.c | 4 ++-- arch/x86/src/common/up_blocktask.c | 4 ++-- arch/x86/src/common/up_unblocktask.c | 4 ++-- arch/x86/src/i486/up_sigdeliver.c | 2 +- arch/xtensa/src/common/xtensa_blocktask.c | 4 ++-- arch/xtensa/src/common/xtensa_sigdeliver.c | 2 +- arch/xtensa/src/common/xtensa_unblocktask.c | 4 ++-- arch/z16/src/common/up_blocktask.c | 4 ++-- arch/z16/src/common/up_sigdeliver.c | 2 +- arch/z16/src/common/up_unblocktask.c | 4 ++-- arch/z80/src/common/up_blocktask.c | 4 ++-- arch/z80/src/common/up_unblocktask.c | 2 +- arch/z80/src/ez80/ez80_sigdeliver.c | 2 +- arch/z80/src/z180/z180_sigdeliver.c | 2 +- arch/z80/src/z8/z8_sigdeliver.c | 2 +- arch/z80/src/z80/z80_sigdeliver.c | 2 +- configs/lc823450-xgevk/src/lc823450_st7565.c | 2 +- configs/mikroe-stm32f4/src/stm32_touchscreen.c | 4 ++-- configs/pic32mx7mmb/src/pic32_touchscreen.c | 4 ++-- configs/sam4s-xplained-pro/src/sam_wdt.c | 2 +- drivers/input/ads7843e.c | 4 ++-- drivers/input/max11802.c | 4 ++-- drivers/input/mxt.c | 2 +- drivers/input/stmpe811_tsc.c | 2 +- drivers/input/tsc2007.c | 4 ++-- drivers/sensors/lis331dl.c | 8 ++++---- drivers/wireless/nrf24l01.c | 2 +- graphics/nxterm/nxterm_sem.c | 2 +- libs/libnx/nxfonts/nxfonts_cache.c | 2 +- net/igmp/igmp_msg.c | 2 +- net/udp/udp_conn.c | 2 +- sched/init/os_bringup.c | 2 +- sched/irq/irq_spinlock.c | 4 ++-- sched/mqueue/mq_sndinternal.c | 2 +- sched/paging/pg_worker.c | 4 ++-- sched/sched/sched_addprioritized.c | 2 +- sched/sched/sched_free.c | 2 +- sched/sched/sched_mergepending.c | 2 +- sched/sched/sched_setpriority.c | 4 ++-- sched/sched/sched_tasklistlock.c | 4 ++-- sched/semaphore/sem_post.c | 2 +- sched/semaphore/sem_wait.c | 2 +- sched/signal/sig_action.c | 2 +- sched/signal/sig_dispatch.c | 12 ++++++------ sched/signal/sig_suspend.c | 2 +- sched/task/task_spawnparms.c | 2 +- sched/wdog/wd_cancel.c | 2 +- 129 files changed, 219 insertions(+), 219 deletions(-) diff --git a/arch/arm/src/arm/up_blocktask.c b/arch/arm/src/arm/up_blocktask.c index 97d1838d8a..3d0664aadb 100644 --- a/arch/arm/src/arm/up_blocktask.c +++ b/arch/arm/src/arm/up_blocktask.c @@ -81,8 +81,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/arm/src/arm/up_sigdeliver.c b/arch/arm/src/arm/up_sigdeliver.c index 1fb7b1eeff..5eae180317 100644 --- a/arch/arm/src/arm/up_sigdeliver.c +++ b/arch/arm/src/arm/up_sigdeliver.c @@ -97,7 +97,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/arm/src/arm/up_unblocktask.c b/arch/arm/src/arm/up_unblocktask.c index e94c81de0c..6203fc94f5 100644 --- a/arch/arm/src/arm/up_unblocktask.c +++ b/arch/arm/src/arm/up_unblocktask.c @@ -75,8 +75,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/arm/src/armv6-m/up_blocktask.c b/arch/arm/src/armv6-m/up_blocktask.c index c01894715a..7a2fa97e13 100644 --- a/arch/arm/src/armv6-m/up_blocktask.c +++ b/arch/arm/src/armv6-m/up_blocktask.c @@ -79,8 +79,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/arm/src/armv6-m/up_sigdeliver.c b/arch/arm/src/armv6-m/up_sigdeliver.c index ed045faf38..c4781b4dce 100644 --- a/arch/arm/src/armv6-m/up_sigdeliver.c +++ b/arch/arm/src/armv6-m/up_sigdeliver.c @@ -90,7 +90,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/arm/src/armv6-m/up_unblocktask.c b/arch/arm/src/armv6-m/up_unblocktask.c index 1fbae12950..5991a9b460 100644 --- a/arch/arm/src/armv6-m/up_unblocktask.c +++ b/arch/arm/src/armv6-m/up_unblocktask.c @@ -73,8 +73,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/arm/src/armv7-a/arm_blocktask.c b/arch/arm/src/armv7-a/arm_blocktask.c index 8fdbef00a3..97d0ca28c8 100644 --- a/arch/arm/src/armv7-a/arm_blocktask.c +++ b/arch/arm/src/armv7-a/arm_blocktask.c @@ -94,8 +94,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/arm/src/armv7-a/arm_doirq.c b/arch/arm/src/armv7-a/arm_doirq.c index fa3e104582..689e3fc553 100644 --- a/arch/arm/src/armv7-a/arm_doirq.c +++ b/arch/arm/src/armv7-a/arm_doirq.c @@ -216,8 +216,8 @@ uint32_t *arm_doirq(int irq, uint32_t *regs) * multiple pending SGI interrupts. */ - ASSERT((unsigned int)irq <= GIC_IRQ_SGI15 && - (g_sgi_pending[cpu] & bit) == 0); + DEBUGASSERT((unsigned int)irq <= GIC_IRQ_SGI15 && + (g_sgi_pending[cpu] & bit) == 0); /* Mare the SGI as pending and return immediately */ diff --git a/arch/arm/src/armv7-a/arm_sigdeliver.c b/arch/arm/src/armv7-a/arm_sigdeliver.c index daef2f9d92..d47041dafe 100644 --- a/arch/arm/src/armv7-a/arm_sigdeliver.c +++ b/arch/arm/src/armv7-a/arm_sigdeliver.c @@ -94,7 +94,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/arm/src/armv7-a/arm_unblocktask.c b/arch/arm/src/armv7-a/arm_unblocktask.c index 906d33796b..f932989061 100644 --- a/arch/arm/src/armv7-a/arm_unblocktask.c +++ b/arch/arm/src/armv7-a/arm_unblocktask.c @@ -88,8 +88,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/arm/src/armv7-m/up_blocktask.c b/arch/arm/src/armv7-m/up_blocktask.c index 68151cb09b..6fcbcbf917 100644 --- a/arch/arm/src/armv7-m/up_blocktask.c +++ b/arch/arm/src/armv7-m/up_blocktask.c @@ -80,8 +80,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/arm/src/armv7-m/up_sigdeliver.c b/arch/arm/src/armv7-m/up_sigdeliver.c index b8c2fe4230..3b917eb3cb 100644 --- a/arch/arm/src/armv7-m/up_sigdeliver.c +++ b/arch/arm/src/armv7-m/up_sigdeliver.c @@ -95,7 +95,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/arm/src/armv7-m/up_unblocktask.c b/arch/arm/src/armv7-m/up_unblocktask.c index 7ecbbd0e57..35a6f8522f 100644 --- a/arch/arm/src/armv7-m/up_unblocktask.c +++ b/arch/arm/src/armv7-m/up_unblocktask.c @@ -74,8 +74,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/arm/src/armv7-r/arm_blocktask.c b/arch/arm/src/armv7-r/arm_blocktask.c index c35093df07..f70c23b152 100644 --- a/arch/arm/src/armv7-r/arm_blocktask.c +++ b/arch/arm/src/armv7-r/arm_blocktask.c @@ -81,8 +81,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/arm/src/armv7-r/arm_sigdeliver.c b/arch/arm/src/armv7-r/arm_sigdeliver.c index be24c2c01c..d5260acdca 100644 --- a/arch/arm/src/armv7-r/arm_sigdeliver.c +++ b/arch/arm/src/armv7-r/arm_sigdeliver.c @@ -85,7 +85,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/arm/src/armv7-r/arm_unblocktask.c b/arch/arm/src/armv7-r/arm_unblocktask.c index 10188aac10..b1946fadf5 100644 --- a/arch/arm/src/armv7-r/arm_unblocktask.c +++ b/arch/arm/src/armv7-r/arm_unblocktask.c @@ -87,8 +87,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/arm/src/efm32/efm32_i2c.c b/arch/arm/src/efm32/efm32_i2c.c index 29a3c56b38..87e6b82747 100644 --- a/arch/arm/src/efm32/efm32_i2c.c +++ b/arch/arm/src/efm32/efm32_i2c.c @@ -1604,11 +1604,11 @@ int efm32_i2c_reset(FAR struct i2c_master_s *dev) uint32_t sda_gpio; int ret = ERROR; - ASSERT(dev); + DEBUGASSERT(dev); /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -1765,7 +1765,7 @@ int efm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev) FAR struct efm32_i2c_priv_s *priv = (struct efm32_i2c_priv_s *)dev; irqstate_t flags; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement reference count and check for underflow */ diff --git a/arch/arm/src/efm32/efm32_pwm.c b/arch/arm/src/efm32/efm32_pwm.c index ec0ac79555..e619f80569 100644 --- a/arch/arm/src/efm32/efm32_pwm.c +++ b/arch/arm/src/efm32/efm32_pwm.c @@ -405,7 +405,7 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv, break; default: - ASSERT(false); + DEBUGASSERT(false); } pwm_putreg(priv, EFM32_TIMER_ROUTE_OFFSET, regval); @@ -625,7 +625,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) break; default: - ASSERT(false); + DEBUGASSERT(false); break; } diff --git a/arch/arm/src/imxrt/imxrt_enet.c b/arch/arm/src/imxrt/imxrt_enet.c index 4ef0a1868f..d92eeb87a4 100644 --- a/arch/arm/src/imxrt/imxrt_enet.c +++ b/arch/arm/src/imxrt/imxrt_enet.c @@ -523,7 +523,7 @@ static int imxrt_transmit(FAR struct imxrt_driver_s *priv) } else { - ASSERT(txdesc->data == buf); + DEBUGASSERT(txdesc->data == buf); } /* Start the TX transfer (if it was not already waiting for buffers) */ diff --git a/arch/arm/src/kinetis/kinetis_enet.c b/arch/arm/src/kinetis/kinetis_enet.c index 984e4c5652..d607bbc981 100644 --- a/arch/arm/src/kinetis/kinetis_enet.c +++ b/arch/arm/src/kinetis/kinetis_enet.c @@ -494,7 +494,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv) } else { - ASSERT(txdesc->data == buf); + DEBUGASSERT(txdesc->data == buf); } /* Start the TX transfer (if it was not already waiting for buffers) */ diff --git a/arch/arm/src/lc823450/lc823450_clockconfig.c b/arch/arm/src/lc823450/lc823450_clockconfig.c index 8c64fc2909..e882b0bd57 100644 --- a/arch/arm/src/lc823450/lc823450_clockconfig.c +++ b/arch/arm/src/lc823450/lc823450_clockconfig.c @@ -168,7 +168,7 @@ void lc823450_clockconfig() } else { - ASSERT(false); + DEBUGASSERT(false); } #endif diff --git a/arch/arm/src/lc823450/lc823450_i2c.c b/arch/arm/src/lc823450/lc823450_i2c.c index 9d1c130791..bf179e16e4 100644 --- a/arch/arm/src/lc823450/lc823450_i2c.c +++ b/arch/arm/src/lc823450/lc823450_i2c.c @@ -1107,7 +1107,7 @@ FAR struct i2c_master_s *lc823450_i2cbus_initialize(int port) break; #endif default: - ASSERT(false); + DEBUGASSERT(false); return NULL; } @@ -1144,7 +1144,7 @@ int lc823450_i2cbus_uninitialize(FAR struct i2c_master_s *dev) irqstate_t flags; int port = -1; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement refs and check for underflow */ diff --git a/arch/arm/src/lc823450/lc823450_i2s.c b/arch/arm/src/lc823450/lc823450_i2s.c index 2eed848def..9607f9ae6a 100644 --- a/arch/arm/src/lc823450/lc823450_i2s.c +++ b/arch/arm/src/lc823450/lc823450_i2s.c @@ -271,7 +271,7 @@ extern unsigned int XT1OSC_CLK; static void _setup_audio_pll(uint32_t freq) { - ASSERT(24000000 == XT1OSC_CLK); + DEBUGASSERT(24000000 == XT1OSC_CLK); uint32_t m; uint32_t n; @@ -289,7 +289,7 @@ static void _setup_audio_pll(uint32_t freq) break; default: - ASSERT(false); + DEBUGASSERT(false); } /* Set divider */ @@ -396,7 +396,7 @@ static void lc823450_i2s_setchannel(char id, uint8_t ch) break; default: - ASSERT(false); + DEBUGASSERT(false); break; } @@ -441,7 +441,7 @@ static int lc823450_i2s_ioctl(struct i2s_dev_s *dev, int cmd, unsigned long arg) { case AUDIOIOC_CONFIGURE: cap_desc = (FAR const struct audio_caps_desc_s *)((uintptr_t)arg); - ASSERT(NULL != cap_desc); + DEBUGASSERT(NULL != cap_desc); tx_th = cap_desc->caps.ac_controls.w >> 24; rate[1] = cap_desc->caps.ac_controls.w & 0xfffff; @@ -663,7 +663,7 @@ static int lc823450_i2s_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb, uint32_t bufc_enabled; uint32_t decsel; - ASSERT(0 < n); + DEBUGASSERT(0 < n); decsel = getreg32(AUDSEL) & AUDSEL_DECSEL; diff --git a/arch/arm/src/lc823450/lc823450_irq.c b/arch/arm/src/lc823450/lc823450_irq.c index aa53025aad..947fae28b4 100644 --- a/arch/arm/src/lc823450/lc823450_irq.c +++ b/arch/arm/src/lc823450/lc823450_irq.c @@ -736,7 +736,7 @@ void up_ack_irq(int irq) { /* IRQ should be handled on CPU0 */ - ASSERT(false); + DEBUGASSERT(false); } #endif diff --git a/arch/arm/src/lc823450/lc823450_mtd.c b/arch/arm/src/lc823450/lc823450_mtd.c index 0a4b3b19ea..5780f5baa3 100644 --- a/arch/arm/src/lc823450/lc823450_mtd.c +++ b/arch/arm/src/lc823450/lc823450_mtd.c @@ -655,9 +655,9 @@ int lc823450_mtd_initialize(uint32_t devno) #ifdef CONFIG_DEBUG for (i = 0; i < LC823450_NPARTS - 1; i++) { - ASSERT(partinfo[i].startblock < partinfo[i + 1].startblock); - ASSERT(partinfo[i].startblock + partinfo[i].nblocks <= maxblock); - ASSERT(partinfo[i + 1].startblock + partinfo[i + 1].nblocks <= maxblock); + DEBUGASSERT(partinfo[i].startblock < partinfo[i + 1].startblock); + DEBUGASSERT(partinfo[i].startblock + partinfo[i].nblocks <= maxblock); + DEBUGASSERT(partinfo[i + 1].startblock + partinfo[i + 1].nblocks <= maxblock); } #endif diff --git a/arch/arm/src/lc823450/lc823450_sdc.c b/arch/arm/src/lc823450/lc823450_sdc.c index a1e9927740..e1b727775a 100644 --- a/arch/arm/src/lc823450/lc823450_sdc.c +++ b/arch/arm/src/lc823450/lc823450_sdc.c @@ -241,7 +241,7 @@ int lc823450_sdc_initialize(uint32_t ch) /* Only ES2 is supported */ - ASSERT(1 == cpu_ver); + DEBUGASSERT(1 == cpu_ver); struct SdDrCfg_s *psd = _cfg[ch]; @@ -280,7 +280,7 @@ int lc823450_sdc_initialize(uint32_t ch) #endif default: - ASSERT(false); + DEBUGASSERT(false); } mcinfo("++++ start \n"); diff --git a/arch/arm/src/lc823450/lc823450_sddrv_dep.c b/arch/arm/src/lc823450/lc823450_sddrv_dep.c index fd4ce5dcfa..7ead22cb8d 100644 --- a/arch/arm/src/lc823450/lc823450_sddrv_dep.c +++ b/arch/arm/src/lc823450/lc823450_sddrv_dep.c @@ -110,7 +110,7 @@ static int _get_ch_from_cfg(struct SdDrCfg_s *cfg) break; default: - ASSERT(false); + DEBUGASSERT(false); } return ch; diff --git a/arch/arm/src/lc823450/lc823450_syscontrol.c b/arch/arm/src/lc823450/lc823450_syscontrol.c index 6f9d08775f..34258cbbcc 100644 --- a/arch/arm/src/lc823450/lc823450_syscontrol.c +++ b/arch/arm/src/lc823450/lc823450_syscontrol.c @@ -146,7 +146,7 @@ void up_enable_clk(enum clock_e clk) irqstate_t flags; flags = spin_lock_irqsave(); - ASSERT(clk < LC823450_CLOCK_NUM); + DEBUGASSERT(clk < LC823450_CLOCK_NUM); if (lc823450_clocks[clk].count++ == 0) { @@ -166,7 +166,7 @@ void up_disable_clk(enum clock_e clk) irqstate_t flags; flags = spin_lock_irqsave(); - ASSERT(clk < LC823450_CLOCK_NUM); + DEBUGASSERT(clk < LC823450_CLOCK_NUM); if (--lc823450_clocks[clk].count == 0) { @@ -174,7 +174,7 @@ void up_disable_clk(enum clock_e clk) lc823450_clocks[clk].regmask, 0); } - /* ASSERT(lc823450_clocks[clk].count >= 0); */ + /* DEBUGASSERT(lc823450_clocks[clk].count >= 0); */ if (lc823450_clocks[clk].count < 0) { diff --git a/arch/arm/src/lc823450/lc823450_timer.c b/arch/arm/src/lc823450/lc823450_timer.c index eca0d8f3ef..8dcb71387b 100644 --- a/arch/arm/src/lc823450/lc823450_timer.c +++ b/arch/arm/src/lc823450/lc823450_timer.c @@ -355,7 +355,7 @@ int up_proftimerisr(int irq, uint32_t *regs, FAR void *arg) { if (profile_ptr != CONFIG_PROFILE_SAMPLES) { - ASSERT(current_regs); + DEBUGASSERT(current_regs); profile_data[profile_ptr++] = current_regs[REG_R15]; } else diff --git a/arch/arm/src/lpc43xx/lpc43_timer.c b/arch/arm/src/lpc43xx/lpc43_timer.c index 7c68ffd449..7cfe3d2f3a 100644 --- a/arch/arm/src/lpc43xx/lpc43_timer.c +++ b/arch/arm/src/lpc43xx/lpc43_timer.c @@ -752,7 +752,7 @@ void lpc43_tmrinitialize(FAR const char *devpath, int irq) #endif default: - ASSERT(0); + DEBUGASSERT(0); } priv->ops = &g_tmrops; diff --git a/arch/arm/src/sam34/sam_tc.c b/arch/arm/src/sam34/sam_tc.c index 3212174623..80595546e7 100644 --- a/arch/arm/src/sam34/sam_tc.c +++ b/arch/arm/src/sam34/sam_tc.c @@ -642,7 +642,7 @@ void sam_tcinitialize(FAR const char *devpath, int irq) #endif default: - ASSERT(0); + DEBUGASSERT(0); } priv->ops = &g_tcops; diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c index 4e902f46b5..97b6d9a056 100644 --- a/arch/arm/src/sam34/sam_wdt.c +++ b/arch/arm/src/sam34/sam_wdt.c @@ -570,7 +570,7 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, return oldhandler; #endif - ASSERT(0); + DEBUGASSERT(0); return NULL; } diff --git a/arch/arm/src/sama5/sam_adc.c b/arch/arm/src/sama5/sam_adc.c index d6975391a4..f1e9a45413 100644 --- a/arch/arm/src/sama5/sam_adc.c +++ b/arch/arm/src/sama5/sam_adc.c @@ -610,7 +610,7 @@ static void sam_adc_dmadone(void *arg) int i; ainfo("ready=%d enabled=%d\n", priv->enabled, priv->ready); - ASSERT(priv != NULL && !priv->ready); + DEBUGASSERT(priv != NULL && !priv->ready); /* If the DMA transfer is not enabled, just ignore the data (and do not start * the next DMA transfer). @@ -853,7 +853,7 @@ static void sam_adc_endconversion(void *arg) uint32_t pending; int chan; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); ainfo("pending=%08x\n", priv->pending); /* Get the set of unmasked, pending ADC interrupts */ diff --git a/arch/arm/src/sama5/sam_ssc.c b/arch/arm/src/sama5/sam_ssc.c index 3f9c62fb26..0515cca8a7 100644 --- a/arch/arm/src/sama5/sam_ssc.c +++ b/arch/arm/src/sama5/sam_ssc.c @@ -970,7 +970,7 @@ static struct sam_buffer_s *ssc_buf_allocate(struct sam_ssc_s *priv) flags = enter_critical_section(); bfcontainer = priv->freelist; - ASSERT(bfcontainer); + DEBUGASSERT(bfcontainer); /* Unlink the buffer from the freelist */ diff --git a/arch/arm/src/sama5/sam_tsd.c b/arch/arm/src/sama5/sam_tsd.c index 887207c384..3446500878 100644 --- a/arch/arm/src/sama5/sam_tsd.c +++ b/arch/arm/src/sama5/sam_tsd.c @@ -522,7 +522,7 @@ static void sam_tsd_bottomhalf(void *arg) uint32_t p; bool pendown; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Get the set of pending ADC interrupts and pen status */ diff --git a/arch/arm/src/sama5/sam_twi.c b/arch/arm/src/sama5/sam_twi.c index 11f9cf8801..7cc040f465 100644 --- a/arch/arm/src/sama5/sam_twi.c +++ b/arch/arm/src/sama5/sam_twi.c @@ -873,7 +873,7 @@ static int twi_reset(FAR struct i2c_master_s *dev) uint32_t sdapin; int ret; - ASSERT(priv); + DEBUGASSERT(priv); /* Get exclusive access to the TWI device */ diff --git a/arch/arm/src/samd2l2/sam_i2c_master.c b/arch/arm/src/samd2l2/sam_i2c_master.c index a172eb1972..b55a3b705c 100644 --- a/arch/arm/src/samd2l2/sam_i2c_master.c +++ b/arch/arm/src/samd2l2/sam_i2c_master.c @@ -1404,7 +1404,7 @@ int sam_i2c_reset(FAR struct i2c_master_s *dev) struct sam_i2c_dev_s *priv = (struct sam_i2c_dev_s *)dev; int ret; - ASSERT(priv); + DEBUGASSERT(priv); /* Get exclusive access to the I2C device */ diff --git a/arch/arm/src/samd5e5/sam_i2c_master.c b/arch/arm/src/samd5e5/sam_i2c_master.c index f70526b381..530b93c662 100644 --- a/arch/arm/src/samd5e5/sam_i2c_master.c +++ b/arch/arm/src/samd5e5/sam_i2c_master.c @@ -1455,7 +1455,7 @@ int sam_i2c_reset(FAR struct i2c_master_s *dev) struct sam_i2c_dev_s *priv = (struct sam_i2c_dev_s *)dev; int ret; - ASSERT(priv); + DEBUGASSERT(priv); /* Get exclusive access to the I2C device */ diff --git a/arch/arm/src/samv7/sam_ssc.c b/arch/arm/src/samv7/sam_ssc.c index 81d230e937..33d44caef3 100644 --- a/arch/arm/src/samv7/sam_ssc.c +++ b/arch/arm/src/samv7/sam_ssc.c @@ -944,7 +944,7 @@ static struct sam_buffer_s *ssc_buf_allocate(struct sam_ssc_s *priv) flags = enter_critical_section(); bfcontainer = priv->freelist; - ASSERT(bfcontainer); + DEBUGASSERT(bfcontainer); /* Unlink the buffer from the freelist */ diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c index 673e1b7f4e..37d6a25956 100644 --- a/arch/arm/src/stm32/stm32_dma2d.c +++ b/arch/arm/src/stm32/stm32_dma2d.c @@ -409,7 +409,7 @@ static int stm32_dma2dirq(int irq, void *context, FAR void *arg) { /* Unknown irq, should not occur */ - ASSERT("Unknown interrupt error\n"); + DEBUGASSERT("Unknown interrupt error\n"); } /* Unlock the semaphore if locked */ diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index 185629cffb..3ff1fe5976 100644 --- a/arch/arm/src/stm32/stm32_i2c.c +++ b/arch/arm/src/stm32/stm32_i2c.c @@ -1801,11 +1801,11 @@ static int stm32_i2c_reset(FAR struct i2c_master_s *dev) uint32_t frequency; int ret = ERROR; - ASSERT(dev); + DEBUGASSERT(dev); /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -1986,7 +1986,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev) FAR struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev; irqstate_t flags; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement reference count and check for underflow */ diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/arch/arm/src/stm32/stm32_i2c_alt.c index 686949ada4..65f71150cb 100644 --- a/arch/arm/src/stm32/stm32_i2c_alt.c +++ b/arch/arm/src/stm32/stm32_i2c_alt.c @@ -2266,11 +2266,11 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev) uint32_t frequency; int ret = ERROR; - ASSERT(dev); + DEBUGASSERT(dev); /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -2448,7 +2448,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev) FAR struct stm32_i2c_priv_s *priv = (FAR struct stm32_i2c_priv_s *)dev; irqstate_t flags; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement reference count and check for underflow */ diff --git a/arch/arm/src/stm32/stm32_i2s.c b/arch/arm/src/stm32/stm32_i2s.c index 1617d103cd..8d417cd3cb 100644 --- a/arch/arm/src/stm32/stm32_i2s.c +++ b/arch/arm/src/stm32/stm32_i2s.c @@ -710,7 +710,7 @@ static struct stm32_buffer_s *i2s_buf_allocate(struct stm32_i2s_s *priv) flags = enter_critical_section(); bfcontainer = priv->freelist; - ASSERT(bfcontainer); + DEBUGASSERT(bfcontainer); /* Unlink the buffer from the freelist */ diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c index 0e6f1e6fa4..bc710753ce 100644 --- a/arch/arm/src/stm32/stm32_ltdc.c +++ b/arch/arm/src/stm32/stm32_ltdc.c @@ -1524,7 +1524,7 @@ static int stm32_ltdcirq(int irq, void *context, FAR void *arg) } else { - ASSERT("Unknown interrupt"); + DEBUGASSERT("Unknown interrupt"); } /* Unlock the semaphore if locked */ diff --git a/arch/arm/src/stm32/stm32_tickless.c b/arch/arm/src/stm32/stm32_tickless.c index ada48b2d8c..4fd59b4420 100644 --- a/arch/arm/src/stm32/stm32_tickless.c +++ b/arch/arm/src/stm32/stm32_tickless.c @@ -447,7 +447,7 @@ void arm_timer_initialize(void) /* Basic timers not supported by this implementation */ - ASSERT(0); + DEBUGASSERT(0); break; #endif @@ -456,7 +456,7 @@ void arm_timer_initialize(void) /* Basic timers not supported by this implementation */ - ASSERT(0); + DEBUGASSERT(0); break; #endif @@ -517,7 +517,7 @@ void arm_timer_initialize(void) #endif default: - ASSERT(0); + DEBUGASSERT(0); } /* Get the TC frequency that corresponds to the requested resolution */ @@ -535,7 +535,7 @@ void arm_timer_initialize(void) if (!g_tickless.tch) { tmrerr("ERROR: Failed to allocate TIM%d\n", g_tickless.timer); - ASSERT(0); + DEBUGASSERT(0); } STM32_TIM_SETCLOCK(g_tickless.tch, g_tickless.frequency); diff --git a/arch/arm/src/stm32/stm32f30xxx_i2c.c b/arch/arm/src/stm32/stm32f30xxx_i2c.c index 3fcf283f2e..31210bfc6e 100644 --- a/arch/arm/src/stm32/stm32f30xxx_i2c.c +++ b/arch/arm/src/stm32/stm32f30xxx_i2c.c @@ -1804,11 +1804,11 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev) uint32_t frequency; int ret = ERROR; - ASSERT(dev); + DEBUGASSERT(dev); /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -1986,7 +1986,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s * dev) FAR struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev; irqstate_t flags; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement refs and check for underflow */ diff --git a/arch/arm/src/stm32f0/stm32f0_i2c.c b/arch/arm/src/stm32f0/stm32f0_i2c.c index f82c5e33ec..f16e6fe2b5 100644 --- a/arch/arm/src/stm32f0/stm32f0_i2c.c +++ b/arch/arm/src/stm32f0/stm32f0_i2c.c @@ -1779,11 +1779,11 @@ static int stm32f0_i2c_reset(FAR struct i2c_master_s * dev) uint32_t frequency; int ret = -EIO; - ASSERT(dev); + DEBUGASSERT(dev); /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -1969,7 +1969,7 @@ int stm32f0_i2cbus_uninitialize(FAR struct i2c_master_s * dev) FAR struct stm32f0_i2c_priv_s *priv = (struct stm32f0_i2c_priv_s *)dev; irqstate_t flags; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement refs and check for underflow */ diff --git a/arch/arm/src/stm32f7/stm32_dma2d.c b/arch/arm/src/stm32f7/stm32_dma2d.c index 5ac9a78b66..81dfbedbfb 100644 --- a/arch/arm/src/stm32f7/stm32_dma2d.c +++ b/arch/arm/src/stm32f7/stm32_dma2d.c @@ -410,7 +410,7 @@ static int stm32_dma2dirq(int irq, void *context, FAR void *arg) { /* Unknown irq, should not occur */ - ASSERT("Unknown interrupt error\n"); + DEBUGASSERT("Unknown interrupt error\n"); } /* Unlock the semaphore if locked */ diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/arch/arm/src/stm32f7/stm32_i2c.c index 7a232d7f8f..4d132cb83b 100644 --- a/arch/arm/src/stm32f7/stm32_i2c.c +++ b/arch/arm/src/stm32f7/stm32_i2c.c @@ -2554,7 +2554,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev) uint32_t frequency; int ret = ERROR; - ASSERT(dev); + DEBUGASSERT(dev); /* Get I2C private structure */ @@ -2562,7 +2562,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev) /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -2837,7 +2837,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s * dev) { irqstate_t irqs; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement refs and check for underflow */ diff --git a/arch/arm/src/stm32f7/stm32_ltdc.c b/arch/arm/src/stm32f7/stm32_ltdc.c index 85133cb9e7..22f1c3c6c2 100644 --- a/arch/arm/src/stm32f7/stm32_ltdc.c +++ b/arch/arm/src/stm32f7/stm32_ltdc.c @@ -1526,7 +1526,7 @@ static int stm32_ltdcirq(int irq, void *context, FAR void *arg) } else { - ASSERT("Unknown interrupt"); + DEBUGASSERT("Unknown interrupt"); } /* Unlock the semaphore if locked */ diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/arch/arm/src/stm32l4/stm32l4_i2c.c index 389bfcd739..fa1bd0ead9 100644 --- a/arch/arm/src/stm32l4/stm32l4_i2c.c +++ b/arch/arm/src/stm32l4/stm32l4_i2c.c @@ -2704,7 +2704,7 @@ static int stm32l4_i2c_reset(FAR struct i2c_master_s * dev) uint32_t frequency; int ret = ERROR; - ASSERT(dev); + DEBUGASSERT(dev); /* Get I2C private structure */ @@ -2712,7 +2712,7 @@ static int stm32l4_i2c_reset(FAR struct i2c_master_s * dev) /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ @@ -2984,7 +2984,7 @@ int stm32l4_i2cbus_uninitialize(FAR struct i2c_master_s * dev) { irqstate_t irqs; - ASSERT(dev); + DEBUGASSERT(dev); /* Decrement refs and check for underflow */ diff --git a/arch/arm/src/stm32l4/stm32l4_lptim.c b/arch/arm/src/stm32l4/stm32l4_lptim.c index 4833472120..951e0ab925 100644 --- a/arch/arm/src/stm32l4/stm32l4_lptim.c +++ b/arch/arm/src/stm32l4/stm32l4_lptim.c @@ -464,7 +464,7 @@ static int stm32l4_lptim_setchannel(FAR struct stm32l4_lptim_dev_s *dev, int ret = OK; uint32_t cfg = 0; - ASSERT(dev); + DEBUGASSERT(dev); /* Configure GPIOs */ @@ -532,7 +532,7 @@ FAR struct stm32l4_lptim_dev_s *stm32l4_lptim_init(int timer) int stm32l4_lptim_deinit(FAR struct stm32l4_lptim_dev_s * dev) { - ASSERT(dev); + DEBUGASSERT(dev); /* Disable power */ diff --git a/arch/arm/src/stm32l4/stm32l4_sai.c b/arch/arm/src/stm32l4/stm32l4_sai.c index 21892409d5..1905fa93f9 100644 --- a/arch/arm/src/stm32l4/stm32l4_sai.c +++ b/arch/arm/src/stm32l4/stm32l4_sai.c @@ -1207,7 +1207,7 @@ static struct sai_buffer_s *sai_buf_allocate(struct stm32l4_sai_s *priv) flags = enter_critical_section(); bfcontainer = priv->freelist; - ASSERT(bfcontainer); + DEBUGASSERT(bfcontainer); /* Unlink the buffer from the freelist */ @@ -1305,7 +1305,7 @@ static void sai_portinitialize(struct stm32l4_sai_s *priv) /* Create a watchdog timer to catch transfer timeouts */ priv->dog = wd_create(); - ASSERT(priv->dog); + DEBUGASSERT(priv->dog); /* Initialize buffering */ diff --git a/arch/arm/src/tiva/tiva_i2c.c b/arch/arm/src/tiva/tiva_i2c.c index c0aec12976..0e4253d89a 100644 --- a/arch/arm/src/tiva/tiva_i2c.c +++ b/arch/arm/src/tiva/tiva_i2c.c @@ -1776,7 +1776,7 @@ static int tiva_i2c_reset(FAR struct i2c_master_s * dev) /* Our caller must own a ref */ - ASSERT(priv->refs > 0); + DEBUGASSERT(priv->refs > 0); /* Lock out other clients */ diff --git a/arch/arm/src/tms570/tms570_boot.c b/arch/arm/src/tms570/tms570_boot.c index 653825cce4..bbaf128b44 100644 --- a/arch/arm/src/tms570/tms570_boot.c +++ b/arch/arm/src/tms570/tms570_boot.c @@ -146,7 +146,7 @@ static inline void tms570_check_reset(void) */ #if 0 - ASSERT((regval & SYS_ESR_FAILALL) == 0); + DEBUGASSERT((regval & SYS_ESR_FAILALL) == 0); #else UNUSED(regval); #endif @@ -322,7 +322,7 @@ void arm_boot(void) * application. */ - ASSERT(getreg32(TMS570_ESM_SR3) == 0); + DEBUGASSERT(getreg32(TMS570_ESM_SR3) == 0); /* Initialize clocking to settings provided by board-specific logic */ @@ -341,7 +341,7 @@ void arm_boot(void) /* Run the memory selftest on CPU RAM. */ tms570_memtest_start(PBIST_RINFOL_ESRAM1_RAM); - ASSERT(tms570_memtest_complete() == OK); + DEBUGASSERT(tms570_memtest_complete() == OK); #endif /* CONFIG_TMS570_SELFTEST */ /* Initialize CPU RAM. */ @@ -380,7 +380,7 @@ void arm_boot(void) /* Wait for the memory test to complete */ - ASSERT(tms570_memtest_complete() == OK); + DEBUGASSERT(tms570_memtest_complete() == OK); #endif /* CONFIG_TMS570_SELFTEST */ #ifdef CONFIG_TMS570_MIBASPI1 diff --git a/arch/arm/src/tms570/tms570_clockconfig.c b/arch/arm/src/tms570/tms570_clockconfig.c index 3caeba643d..4b8c884fce 100644 --- a/arch/arm/src/tms570/tms570_clockconfig.c +++ b/arch/arm/src/tms570/tms570_clockconfig.c @@ -837,7 +837,7 @@ void tms570_clockconfig(void) #ifdef CONFIG_TMS570_SELFTEST /* Wait for eFuse controller self-test to complete and check results */ - ASSERT(tms570_efc_selftest_complete() == 0); + DEBUGASSERT(tms570_efc_selftest_complete() == 0); #endif /* Set up flash address and data wait states. */ diff --git a/arch/avr/src/avr/up_blocktask.c b/arch/avr/src/avr/up_blocktask.c index 868a517b40..94c4a44ad8 100644 --- a/arch/avr/src/avr/up_blocktask.c +++ b/arch/avr/src/avr/up_blocktask.c @@ -80,7 +80,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we diff --git a/arch/avr/src/avr/up_sigdeliver.c b/arch/avr/src/avr/up_sigdeliver.c index 7b33c79afd..4a548597a1 100644 --- a/arch/avr/src/avr/up_sigdeliver.c +++ b/arch/avr/src/avr/up_sigdeliver.c @@ -84,7 +84,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/avr/src/avr/up_unblocktask.c b/arch/avr/src/avr/up_unblocktask.c index cea4c6df79..cdd2a0479f 100644 --- a/arch/avr/src/avr/up_unblocktask.c +++ b/arch/avr/src/avr/up_unblocktask.c @@ -74,7 +74,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/avr/src/avr32/up_blocktask.c b/arch/avr/src/avr32/up_blocktask.c index 3e9304be28..1d41fb2913 100644 --- a/arch/avr/src/avr32/up_blocktask.c +++ b/arch/avr/src/avr32/up_blocktask.c @@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we diff --git a/arch/avr/src/avr32/up_sigdeliver.c b/arch/avr/src/avr32/up_sigdeliver.c index 1ef31dfb61..c3ffe6f878 100644 --- a/arch/avr/src/avr32/up_sigdeliver.c +++ b/arch/avr/src/avr32/up_sigdeliver.c @@ -88,7 +88,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/avr/src/avr32/up_unblocktask.c b/arch/avr/src/avr32/up_unblocktask.c index c77c5dbdbb..46c1172e1a 100644 --- a/arch/avr/src/avr32/up_unblocktask.c +++ b/arch/avr/src/avr32/up_unblocktask.c @@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/hc/src/common/up_blocktask.c b/arch/hc/src/common/up_blocktask.c index 9c69ac43db..63194f7ff2 100644 --- a/arch/hc/src/common/up_blocktask.c +++ b/arch/hc/src/common/up_blocktask.c @@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we diff --git a/arch/hc/src/common/up_unblocktask.c b/arch/hc/src/common/up_unblocktask.c index 6ab177ecf1..c79c0f1074 100644 --- a/arch/hc/src/common/up_unblocktask.c +++ b/arch/hc/src/common/up_unblocktask.c @@ -75,8 +75,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/hc/src/m9s12/m9s12_gpio.c b/arch/hc/src/m9s12/m9s12_gpio.c index b861ee2b40..1bd266e702 100644 --- a/arch/hc/src/m9s12/m9s12_gpio.c +++ b/arch/hc/src/m9s12/m9s12_gpio.c @@ -309,7 +309,7 @@ static inline void pim_configgpio(uint16_t cfgset, uint8_t portndx, uint8_t pin) { /* Yes.. then it must not be tagged as an output */ - ASSERT((cfgset & GPIO_DIRECTION) != GPIO_OUTPUT); + DEBUGASSERT((cfgset & GPIO_DIRECTION) != GPIO_OUTPUT); /* If the pull-driver is also enabled, it must be enabled with a * compatible priority. @@ -319,11 +319,11 @@ static inline void pim_configgpio(uint16_t cfgset, uint8_t portndx, uint8_t pin) { if ((cfgset & GPIO_INT_POLARITY) != 0) { - ASSERT((cfgset & GPIO_PULL_POLARITY) != 0); + DEBUGASSERT((cfgset & GPIO_PULL_POLARITY) != 0); } else { - ASSERT((cfgset & GPIO_PULL_POLARITY) == 0); + DEBUGASSERT((cfgset & GPIO_PULL_POLARITY) == 0); } } } diff --git a/arch/mips/src/mips32/up_blocktask.c b/arch/mips/src/mips32/up_blocktask.c index 6ee466611d..e1f399ea9c 100644 --- a/arch/mips/src/mips32/up_blocktask.c +++ b/arch/mips/src/mips32/up_blocktask.c @@ -82,8 +82,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/mips/src/mips32/up_sigdeliver.c b/arch/mips/src/mips32/up_sigdeliver.c index 23fce54143..b56cde6487 100644 --- a/arch/mips/src/mips32/up_sigdeliver.c +++ b/arch/mips/src/mips32/up_sigdeliver.c @@ -98,7 +98,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/mips/src/mips32/up_unblocktask.c b/arch/mips/src/mips32/up_unblocktask.c index 8400b1f7cf..a79843d982 100644 --- a/arch/mips/src/mips32/up_unblocktask.c +++ b/arch/mips/src/mips32/up_unblocktask.c @@ -77,8 +77,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/misoc/src/lm32/lm32_blocktask.c b/arch/misoc/src/lm32/lm32_blocktask.c index 7bc951cfbf..158b5331a9 100644 --- a/arch/misoc/src/lm32/lm32_blocktask.c +++ b/arch/misoc/src/lm32/lm32_blocktask.c @@ -83,8 +83,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/misoc/src/lm32/lm32_sigdeliver.c b/arch/misoc/src/lm32/lm32_sigdeliver.c index 60d5e5f6af..8b1b18ec8f 100644 --- a/arch/misoc/src/lm32/lm32_sigdeliver.c +++ b/arch/misoc/src/lm32/lm32_sigdeliver.c @@ -85,7 +85,7 @@ void lm32_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/misoc/src/lm32/lm32_unblocktask.c b/arch/misoc/src/lm32/lm32_unblocktask.c index 8dedd52993..4ebb0b9839 100644 --- a/arch/misoc/src/lm32/lm32_unblocktask.c +++ b/arch/misoc/src/lm32/lm32_unblocktask.c @@ -78,8 +78,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/or1k/src/common/up_blocktask.c b/arch/or1k/src/common/up_blocktask.c index 6f28f521df..77a28588af 100644 --- a/arch/or1k/src/common/up_blocktask.c +++ b/arch/or1k/src/common/up_blocktask.c @@ -81,8 +81,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/or1k/src/common/up_unblocktask.c b/arch/or1k/src/common/up_unblocktask.c index 255a0242e1..62134209fa 100644 --- a/arch/or1k/src/common/up_unblocktask.c +++ b/arch/or1k/src/common/up_unblocktask.c @@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/renesas/src/common/up_blocktask.c b/arch/renesas/src/common/up_blocktask.c index 9ceda2e1e2..cd81b636a0 100644 --- a/arch/renesas/src/common/up_blocktask.c +++ b/arch/renesas/src/common/up_blocktask.c @@ -80,8 +80,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/renesas/src/common/up_unblocktask.c b/arch/renesas/src/common/up_unblocktask.c index 30a9b4af9c..bc4c7ee303 100644 --- a/arch/renesas/src/common/up_unblocktask.c +++ b/arch/renesas/src/common/up_unblocktask.c @@ -75,8 +75,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/renesas/src/m16c/m16c_sigdeliver.c b/arch/renesas/src/m16c/m16c_sigdeliver.c index 199bb6f752..46e511a0bd 100644 --- a/arch/renesas/src/m16c/m16c_sigdeliver.c +++ b/arch/renesas/src/m16c/m16c_sigdeliver.c @@ -97,7 +97,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/renesas/src/sh1/sh1_sigdeliver.c b/arch/renesas/src/sh1/sh1_sigdeliver.c index 5e1e286eca..50b15087ea 100644 --- a/arch/renesas/src/sh1/sh1_sigdeliver.c +++ b/arch/renesas/src/sh1/sh1_sigdeliver.c @@ -97,7 +97,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/risc-v/src/nr5m100/nr5_timer.c b/arch/risc-v/src/nr5m100/nr5_timer.c index b17fedcbcc..d03fbff9a5 100644 --- a/arch/risc-v/src/nr5m100/nr5_timer.c +++ b/arch/risc-v/src/nr5m100/nr5_timer.c @@ -154,7 +154,7 @@ static int nr5_timer_setclock(FAR struct nr5_timer_dev_s *dev, uint32_t freq) { int prescaler; - ASSERT(dev); + DEBUGASSERT(dev); /* Disable Timer? */ @@ -199,7 +199,7 @@ static int nr5_timer_setclock(FAR struct nr5_timer_dev_s *dev, uint32_t freq) static void nr5_timer_setperiod(FAR struct nr5_timer_dev_s *dev, uint32_t period) { - ASSERT(dev); + DEBUGASSERT(dev); nr5_putreg32(dev, NR5_BTIM_ARR_OFFSET, period); } @@ -208,8 +208,8 @@ static int nr5_timer_setisr(FAR struct nr5_timer_dev_s *dev, { int vectorno; - ASSERT(dev); - ASSERT(source == 0); + DEBUGASSERT(dev); + DEBUGASSERT(source == 0); switch (((struct nr5_timer_priv_s *)dev)->base) { @@ -290,13 +290,13 @@ static int nr5_timer_setisr(FAR struct nr5_timer_dev_s *dev, static void nr5_timer_enableint(FAR struct nr5_timer_dev_s *dev, int source) { - ASSERT(dev); + DEBUGASSERT(dev); nr5_modifyreg16(dev, NR5_BTIM_DIER_OFFSET, 0, ATIM_DIER_UIE); } static void nr5_timer_disableint(FAR struct nr5_timer_dev_s *dev, int source) { - ASSERT(dev); + DEBUGASSERT(dev); nr5_modifyreg16(dev, NR5_BTIM_DIER_OFFSET, ATIM_DIER_UIE, 0); } @@ -313,7 +313,7 @@ static int nr5_timer_setmode(FAR struct nr5_timer_dev_s *dev, nr5_timer_mode_t m { uint16_t val = ATIM_CR1_CEN | ATIM_CR1_ARPE; - ASSERT(dev); + DEBUGASSERT(dev); /* Decode operational modes */ @@ -465,7 +465,7 @@ FAR struct nr5_timer_dev_s *nr5_timer_init(int timer) int nr5_timer_deinit(FAR struct nr5_timer_dev_s * dev) { - ASSERT(dev); + DEBUGASSERT(dev); /* Set timer mode to STOP */ diff --git a/arch/risc-v/src/rv32im/up_blocktask.c b/arch/risc-v/src/rv32im/up_blocktask.c index 0ac7327e12..09e7cd7151 100644 --- a/arch/risc-v/src/rv32im/up_blocktask.c +++ b/arch/risc-v/src/rv32im/up_blocktask.c @@ -82,8 +82,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/risc-v/src/rv32im/up_sigdeliver.c b/arch/risc-v/src/rv32im/up_sigdeliver.c index ccd12cf494..81ea6bf796 100644 --- a/arch/risc-v/src/rv32im/up_sigdeliver.c +++ b/arch/risc-v/src/rv32im/up_sigdeliver.c @@ -91,7 +91,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/risc-v/src/rv32im/up_unblocktask.c b/arch/risc-v/src/rv32im/up_unblocktask.c index 3bb71380dd..db56cd504d 100644 --- a/arch/risc-v/src/rv32im/up_unblocktask.c +++ b/arch/risc-v/src/rv32im/up_unblocktask.c @@ -77,8 +77,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/sim/src/up_blocktask.c b/arch/sim/src/up_blocktask.c index 86a46453ec..8e481007e5 100644 --- a/arch/sim/src/up_blocktask.c +++ b/arch/sim/src/up_blocktask.c @@ -80,8 +80,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); //sinfo("Blocking TCB=%p\n", tcb); diff --git a/arch/sim/src/up_unblocktask.c b/arch/sim/src/up_unblocktask.c index 03e8e847f9..5b47603d40 100644 --- a/arch/sim/src/up_unblocktask.c +++ b/arch/sim/src/up_unblocktask.c @@ -74,8 +74,8 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); sinfo("Unblocking TCB=%p\n", tcb); diff --git a/arch/x86/src/common/up_blocktask.c b/arch/x86/src/common/up_blocktask.c index 34f7f9fa26..24d918a3dc 100644 --- a/arch/x86/src/common/up_blocktask.c +++ b/arch/x86/src/common/up_blocktask.c @@ -80,8 +80,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/x86/src/common/up_unblocktask.c b/arch/x86/src/common/up_unblocktask.c index 8b3b4b3f24..61d22c241a 100644 --- a/arch/x86/src/common/up_unblocktask.c +++ b/arch/x86/src/common/up_unblocktask.c @@ -74,8 +74,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/x86/src/i486/up_sigdeliver.c b/arch/x86/src/i486/up_sigdeliver.c index 9805d3be90..c738be94be 100644 --- a/arch/x86/src/i486/up_sigdeliver.c +++ b/arch/x86/src/i486/up_sigdeliver.c @@ -85,7 +85,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/xtensa/src/common/xtensa_blocktask.c b/arch/xtensa/src/common/xtensa_blocktask.c index 592da9a3f7..5edfe674f4 100644 --- a/arch/xtensa/src/common/xtensa_blocktask.c +++ b/arch/xtensa/src/common/xtensa_blocktask.c @@ -82,8 +82,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/xtensa/src/common/xtensa_sigdeliver.c b/arch/xtensa/src/common/xtensa_sigdeliver.c index bc8de1f8ae..ee8d024afd 100644 --- a/arch/xtensa/src/common/xtensa_sigdeliver.c +++ b/arch/xtensa/src/common/xtensa_sigdeliver.c @@ -93,7 +93,7 @@ void xtensa_sig_deliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/xtensa/src/common/xtensa_unblocktask.c b/arch/xtensa/src/common/xtensa_unblocktask.c index e7fb168ba7..2b9f44c7cb 100644 --- a/arch/xtensa/src/common/xtensa_unblocktask.c +++ b/arch/xtensa/src/common/xtensa_unblocktask.c @@ -77,8 +77,8 @@ void up_unblock_task(struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* Remove the task from the blocked task list */ diff --git a/arch/z16/src/common/up_blocktask.c b/arch/z16/src/common/up_blocktask.c index 0893c933e6..fc5e9912ab 100644 --- a/arch/z16/src/common/up_blocktask.c +++ b/arch/z16/src/common/up_blocktask.c @@ -80,8 +80,8 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* sinfo("Blocking TCB=%p\n", tcb); */ diff --git a/arch/z16/src/common/up_sigdeliver.c b/arch/z16/src/common/up_sigdeliver.c index 4e40bc6a35..54f3723ce0 100644 --- a/arch/z16/src/common/up_sigdeliver.c +++ b/arch/z16/src/common/up_sigdeliver.c @@ -86,7 +86,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/z16/src/common/up_unblocktask.c b/arch/z16/src/common/up_unblocktask.c index 2b09dbc301..db1a43aaeb 100644 --- a/arch/z16/src/common/up_unblocktask.c +++ b/arch/z16/src/common/up_unblocktask.c @@ -76,8 +76,8 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && - (tcb->task_state <= LAST_BLOCKED_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + (tcb->task_state <= LAST_BLOCKED_STATE)); /* sinfo("Unblocking TCB=%p\n", tcb); */ diff --git a/arch/z80/src/common/up_blocktask.c b/arch/z80/src/common/up_blocktask.c index 6910c87b08..068a03cf01 100644 --- a/arch/z80/src/common/up_blocktask.c +++ b/arch/z80/src/common/up_blocktask.c @@ -82,8 +82,8 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && - (tcb->task_state <= LAST_READY_TO_RUN_STATE)); + DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && + (tcb->task_state <= LAST_READY_TO_RUN_STATE)); /* _info("Blocking TCB=%p\n", tcb); */ diff --git a/arch/z80/src/common/up_unblocktask.c b/arch/z80/src/common/up_unblocktask.c index 66f7337dc6..734370f909 100644 --- a/arch/z80/src/common/up_unblocktask.c +++ b/arch/z80/src/common/up_unblocktask.c @@ -78,7 +78,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) /* Verify that the context switch can be performed */ - ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && + DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); /* _info("Unblocking TCB=%p\n", tcb); */ diff --git a/arch/z80/src/ez80/ez80_sigdeliver.c b/arch/z80/src/ez80/ez80_sigdeliver.c index de2d60a358..43e7de155d 100644 --- a/arch/z80/src/ez80/ez80_sigdeliver.c +++ b/arch/z80/src/ez80/ez80_sigdeliver.c @@ -97,7 +97,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/z80/src/z180/z180_sigdeliver.c b/arch/z80/src/z180/z180_sigdeliver.c index 75ffb20dc6..d1d166af4f 100644 --- a/arch/z80/src/z180/z180_sigdeliver.c +++ b/arch/z80/src/z180/z180_sigdeliver.c @@ -96,7 +96,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/z80/src/z8/z8_sigdeliver.c b/arch/z80/src/z8/z8_sigdeliver.c index 57aeb48d65..7ac065f48e 100644 --- a/arch/z80/src/z8/z8_sigdeliver.c +++ b/arch/z80/src/z8/z8_sigdeliver.c @@ -103,7 +103,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/arch/z80/src/z80/z80_sigdeliver.c b/arch/z80/src/z80/z80_sigdeliver.c index e173f92357..8750cecbb2 100644 --- a/arch/z80/src/z80/z80_sigdeliver.c +++ b/arch/z80/src/z80/z80_sigdeliver.c @@ -96,7 +96,7 @@ void up_sigdeliver(void) sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - ASSERT(rtcb->xcp.sigdeliver != NULL); + DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ diff --git a/configs/lc823450-xgevk/src/lc823450_st7565.c b/configs/lc823450-xgevk/src/lc823450_st7565.c index 40291f2e37..f75a627e3f 100644 --- a/configs/lc823450-xgevk/src/lc823450_st7565.c +++ b/configs/lc823450-xgevk/src/lc823450_st7565.c @@ -173,7 +173,7 @@ static int lc823450_st7565_backlight(FAR struct st7565_lcd_s *lcd, int level) int board_lcd_initialize(void) { g_spidev = lc823450_spibus_initialize(LCD_SPI_PORTNO); - ASSERT(NULL != g_spidev); + DEBUGASSERT(NULL != g_spidev); g_spidev->ops->setmode(g_spidev, SPIDEV_MODE3); g_spidev->ops->setbits(g_spidev, 8); diff --git a/configs/mikroe-stm32f4/src/stm32_touchscreen.c b/configs/mikroe-stm32f4/src/stm32_touchscreen.c index d11a9b8cd1..f76100a9a8 100644 --- a/configs/mikroe-stm32f4/src/stm32_touchscreen.c +++ b/configs/mikroe-stm32f4/src/stm32_touchscreen.c @@ -755,7 +755,7 @@ static void tc_worker(FAR void *arg) int16_t ydiff; int ret; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Perform the next action based on the state of the conversions */ @@ -1103,7 +1103,7 @@ static void tc_worker(FAR void *arg) /* Set up the next sample event */ ret = work_queue(HPWORK, &priv->work, tc_worker, priv, delay); - ASSERT(ret == 0); + DEBUGASSERT(ret == 0); } /**************************************************************************** diff --git a/configs/pic32mx7mmb/src/pic32_touchscreen.c b/configs/pic32mx7mmb/src/pic32_touchscreen.c index 6e0d5219c5..83f6d21eb1 100644 --- a/configs/pic32mx7mmb/src/pic32_touchscreen.c +++ b/configs/pic32mx7mmb/src/pic32_touchscreen.c @@ -641,7 +641,7 @@ static void tc_worker(FAR void *arg) int16_t ydiff; int ret; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Perform the next action based on the state of the conversions */ @@ -972,7 +972,7 @@ static void tc_worker(FAR void *arg) /* Set up the next sample event */ ret = work_queue(HPWORK, &priv->work, tc_worker, priv, delay); - ASSERT(ret == 0); + DEBUGASSERT(ret == 0); } /**************************************************************************** diff --git a/configs/sam4s-xplained-pro/src/sam_wdt.c b/configs/sam4s-xplained-pro/src/sam_wdt.c index f405e9b761..4c90aa7e1d 100644 --- a/configs/sam4s-xplained-pro/src/sam_wdt.c +++ b/configs/sam4s-xplained-pro/src/sam_wdt.c @@ -197,7 +197,7 @@ int sam_watchdog_initialize(void) CONFIG_WDT_THREAD_STACKSIZE, (main_t)wdog_daemon, (FAR char * const *)NULL); - ASSERT(taskid > 0); + DEBUGASSERT(taskid > 0); sched_unlock(); #endif return OK; diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c index 460f38cddb..f7c747f7ae 100644 --- a/drivers/input/ads7843e.c +++ b/drivers/input/ads7843e.c @@ -530,7 +530,7 @@ static void ads7843e_worker(FAR void *arg) bool pendown; int ret; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Get a pointer the callbacks for convenience (and so the code is not so * ugly). @@ -721,7 +721,7 @@ static int ads7843e_interrupt(int irq, FAR void *context, FAR void *arg) priv && priv->configs->irq != irq; priv = priv->flink); - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); #endif /* Get a pointer the callbacks for convenience (and so the code is not so diff --git a/drivers/input/max11802.c b/drivers/input/max11802.c index 499692db3c..8a76d05216 100644 --- a/drivers/input/max11802.c +++ b/drivers/input/max11802.c @@ -496,7 +496,7 @@ static void max11802_worker(FAR void *arg) int ret; int tags, tags2; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Get a pointer the callbacks for convenience (and so the code is not so * ugly). @@ -726,7 +726,7 @@ static int max11802_interrupt(int irq, FAR void *context) priv && priv->configs->irq != irq; priv = priv->flink); - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); #endif /* Get a pointer the callbacks for convenience (and so the code is not so diff --git a/drivers/input/mxt.c b/drivers/input/mxt.c index 9199af5764..52e4a3582c 100644 --- a/drivers/input/mxt.c +++ b/drivers/input/mxt.c @@ -988,7 +988,7 @@ static void mxt_worker(FAR void *arg) int retries; int ret; - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Get a pointer the callbacks for convenience (and so the code is not so * ugly). diff --git a/drivers/input/stmpe811_tsc.c b/drivers/input/stmpe811_tsc.c index b6838f8a24..b1f467ebe8 100644 --- a/drivers/input/stmpe811_tsc.c +++ b/drivers/input/stmpe811_tsc.c @@ -979,7 +979,7 @@ void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta) uint16_t y; /* Y position */ bool pendown; /* true: pen is down */ - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Cancel the missing pen up timer */ diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index 549e5a57de..b6520626b4 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -571,7 +571,7 @@ static void tsc2007_worker(FAR void *arg) uint16_t z2; /* Z2 position */ uint32_t pressure; /* Measured pressure */ - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Get a pointer the callbacks for convenience (and so the code is not so * ugly). @@ -764,7 +764,7 @@ static int tsc2007_interrupt(int irq, FAR void *context) priv && priv->configs->irq != irq; priv = priv->flink); - ASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); #endif /* Get a pointer the callbacks for convenience (and so the code is not so diff --git a/drivers/sensors/lis331dl.c b/drivers/sensors/lis331dl.c index 2ae6e21012..e9d5adef3a 100644 --- a/drivers/sensors/lis331dl.c +++ b/drivers/sensors/lis331dl.c @@ -242,8 +242,8 @@ FAR struct lis331dl_dev_s *lis331dl_init(FAR struct i2c_master_s *i2c, FAR struct lis331dl_dev_s *dev; uint8_t retval; - ASSERT(i2c); - ASSERT(address); + DEBUGASSERT(i2c); + DEBUGASSERT(address); dev = kmm_malloc(sizeof(struct lis331dl_dev_s)); if (dev == NULL) @@ -288,7 +288,7 @@ FAR struct lis331dl_dev_s *lis331dl_init(FAR struct i2c_master_s *i2c, int lis331dl_deinit(FAR struct lis331dl_dev_s * dev) { - ASSERT(dev); + DEBUGASSERT(dev); lis331dl_powerdown(dev); kmm_free(dev); @@ -388,7 +388,7 @@ lis331dl_getreadings(FAR struct lis331dl_dev_s * dev) { uint8_t retval[7]; - ASSERT(dev); + DEBUGASSERT(dev); if (lis331dl_access(dev, ST_LIS331DL_STATUS_REG, retval, 7) == 7) { diff --git a/drivers/wireless/nrf24l01.c b/drivers/wireless/nrf24l01.c index 47f7bc46c9..b5286706af 100644 --- a/drivers/wireless/nrf24l01.c +++ b/drivers/wireless/nrf24l01.c @@ -1462,7 +1462,7 @@ int nrf24l01_register(FAR struct spi_dev_s *spi, uint8_t *rx_fifo; #endif - ASSERT((spi != NULL) & (cfg != NULL)); + DEBUGASSERT((spi != NULL) & (cfg != NULL)); if ((dev = kmm_malloc(sizeof(struct nrf24l01_dev_s))) == NULL) { diff --git a/graphics/nxterm/nxterm_sem.c b/graphics/nxterm/nxterm_sem.c index 3ed10037f3..fbdbf41f0a 100644 --- a/graphics/nxterm/nxterm_sem.c +++ b/graphics/nxterm/nxterm_sem.c @@ -102,7 +102,7 @@ int nxterm_sempost(FAR struct nxterm_state_s *priv) /* Make sure that I really hold the semaphore */ - ASSERT(priv->holder == me); + DEBUGASSERT(priv->holder == me); /* Then let go of it */ diff --git a/libs/libnx/nxfonts/nxfonts_cache.c b/libs/libnx/nxfonts/nxfonts_cache.c index 855f731320..1334276cf6 100644 --- a/libs/libnx/nxfonts/nxfonts_cache.c +++ b/libs/libnx/nxfonts/nxfonts_cache.c @@ -836,7 +836,7 @@ void nxf_cache_disconnect(FCACHE fhandle) fcache != priv && fcache != NULL; fcache = fcache->flink); - ASSERT(fcache == priv); + DEBUGASSERT(fcache == priv); nxf_removecache(fcache, prev); nxf_list_unlock(); diff --git a/net/igmp/igmp_msg.c b/net/igmp/igmp_msg.c index 396393e376..1e1d615eed 100644 --- a/net/igmp/igmp_msg.c +++ b/net/igmp/igmp_msg.c @@ -113,7 +113,7 @@ void igmp_waitmsg(FAR struct igmp_group_s *group, uint8_t msgid) * the wait is awakened by a signal. */ - ASSERT(ret == -EINTR || ret == -ECANCELED); + DEBUGASSERT(ret == -EINTR || ret == -ECANCELED); } UNUSED(ret); diff --git a/net/udp/udp_conn.c b/net/udp/udp_conn.c index ae4394cff8..f83fdb7981 100644 --- a/net/udp/udp_conn.c +++ b/net/udp/udp_conn.c @@ -118,7 +118,7 @@ static inline void _udp_semtake(FAR sem_t *sem) * the wait was awakened by a signal. */ - ASSERT(ret == -EINTR || ret == -ECANCELED); + DEBUGASSERT(ret == -EINTR || ret == -ECANCELED); } UNUSED(ret); diff --git a/sched/init/os_bringup.c b/sched/init/os_bringup.c index 7834aa2556..faae4a1662 100644 --- a/sched/init/os_bringup.c +++ b/sched/init/os_bringup.c @@ -304,7 +304,7 @@ static inline void os_do_appstart(void) ret = exec(CONFIG_USER_INITPATH, NULL, CONFIG_INIT_SYMTAB, CONFIG_INIT_NEXPORTS); - ASSERT(ret >= 0); + DEBUGASSERT(ret >= 0); UNUSED(ret); } diff --git a/sched/irq/irq_spinlock.c b/sched/irq/irq_spinlock.c index e15d95453e..f71074da32 100644 --- a/sched/irq/irq_spinlock.c +++ b/sched/irq/irq_spinlock.c @@ -101,7 +101,7 @@ irqstate_t spin_lock_irqsave(void) } g_irq_spin_count[me]++; - ASSERT(0 != g_irq_spin_count[me]); + DEBUGASSERT(0 != g_irq_spin_count[me]); return ret; } @@ -131,7 +131,7 @@ void spin_unlock_irqrestore(irqstate_t flags) { int me = this_cpu(); - ASSERT(0 < g_irq_spin_count[me]); + DEBUGASSERT(0 < g_irq_spin_count[me]); g_irq_spin_count[me]--; if (0 == g_irq_spin_count[me]) diff --git a/sched/mqueue/mq_sndinternal.c b/sched/mqueue/mq_sndinternal.c index 7ad32132cb..b11f23a4af 100644 --- a/sched/mqueue/mq_sndinternal.c +++ b/sched/mqueue/mq_sndinternal.c @@ -454,7 +454,7 @@ int nxmq_do_send(mqd_t mqdes, FAR struct mqueue_msg_s *mqmsg, /* If one was found, unblock it */ - ASSERT(btcb); + DEBUGASSERT(btcb); btcb->msgwaitq = NULL; msgq->nwaitnotempty--; diff --git a/sched/paging/pg_worker.c b/sched/paging/pg_worker.c index b9af376f7b..545c74943c 100644 --- a/sched/paging/pg_worker.c +++ b/sched/paging/pg_worker.c @@ -579,7 +579,7 @@ int pg_worker(int argc, char *argv[]) { /* Any value other than OK, brings the system down */ - ASSERT(g_fillresult == OK); + DEBUGASSERT(g_fillresult == OK); /* Handle the successful page fill complete event by restarting the * task that was blocked waiting for this page fill. @@ -614,7 +614,7 @@ int pg_worker(int argc, char *argv[]) else { pgerr("ERROR: Timeout!\n"); - ASSERT(clock_systimer() - g_starttime < CONFIG_PAGING_TIMEOUT_TICKS); + DEBUGASSERT(clock_systimer() - g_starttime < CONFIG_PAGING_TIMEOUT_TICKS); } #endif } diff --git a/sched/sched/sched_addprioritized.c b/sched/sched/sched_addprioritized.c index 15e20319be..1fdc97fec2 100644 --- a/sched/sched/sched_addprioritized.c +++ b/sched/sched/sched_addprioritized.c @@ -85,7 +85,7 @@ bool sched_addprioritized(FAR struct tcb_s *tcb, DSEG dq_queue_t *list) /* Lets do a sanity check before we get started. */ - ASSERT(sched_priority >= SCHED_PRIORITY_MIN); + DEBUGASSERT(sched_priority >= SCHED_PRIORITY_MIN); /* Search the list to find the location to insert the new Tcb. * Each is list is maintained in descending sched_priority order. diff --git a/sched/sched/sched_free.c b/sched/sched/sched_free.c index 030f0c7a31..bc02ff89b8 100644 --- a/sched/sched/sched_free.c +++ b/sched/sched/sched_free.c @@ -75,7 +75,7 @@ void sched_ufree(FAR void *address) * collect garbage on a group-by-group basis. */ - ASSERT(!up_interrupt_context()); + DEBUGASSERT(!up_interrupt_context()); kumm_free(address); #else diff --git a/sched/sched/sched_mergepending.c b/sched/sched/sched_mergepending.c index bb134b0833..a5840f0335 100644 --- a/sched/sched/sched_mergepending.c +++ b/sched/sched/sched_mergepending.c @@ -124,7 +124,7 @@ bool sched_mergepending(void) * the ready-to-run list! */ - ASSERT(rtcb); + DEBUGASSERT(rtcb); /* The ptcb goes just before rtcb */ diff --git a/sched/sched/sched_setpriority.c b/sched/sched/sched_setpriority.c index d52adb286b..61ef8e847e 100644 --- a/sched/sched/sched_setpriority.c +++ b/sched/sched/sched_setpriority.c @@ -248,7 +248,7 @@ static void sched_readytorun_setpriority(FAR struct tcb_s *tcb, { /* Remove the TCB from the ready-to-run task list that it resides in */ - ASSERT(!sched_removereadytorun(tcb)); + DEBUGASSERT(!sched_removereadytorun(tcb)); /* Change the task priority */ @@ -256,7 +256,7 @@ static void sched_readytorun_setpriority(FAR struct tcb_s *tcb, /* Put it back into the correct ready-to-run task list */ - ASSERT(!sched_addreadytorun(tcb)); + DEBUGASSERT(!sched_addreadytorun(tcb)); } } diff --git a/sched/sched/sched_tasklistlock.c b/sched/sched/sched_tasklistlock.c index 1c9e3bd49e..9e2f90b050 100644 --- a/sched/sched/sched_tasklistlock.c +++ b/sched/sched/sched_tasklistlock.c @@ -91,7 +91,7 @@ irqstate_t sched_tasklist_lock(void) } g_tasklist_lock_count[me]++; - ASSERT(0 != g_tasklist_lock_count[me]); + DEBUGASSERT(0 != g_tasklist_lock_count[me]); return ret; } @@ -121,7 +121,7 @@ void sched_tasklist_unlock(irqstate_t lock) me = this_cpu(); - ASSERT(0 < g_tasklist_lock_count[me]); + DEBUGASSERT(0 < g_tasklist_lock_count[me]); g_tasklist_lock_count[me]--; if (0 == g_tasklist_lock_count[me]) diff --git a/sched/semaphore/sem_post.c b/sched/semaphore/sem_post.c index d9c3123a5e..da01fc26cc 100644 --- a/sched/semaphore/sem_post.c +++ b/sched/semaphore/sem_post.c @@ -118,7 +118,7 @@ int nxsem_post(FAR sem_t *sem) * initialixed if the semaphore is to used for signaling purposes. */ - ASSERT(sem->semcount < SEM_VALUE_MAX); + DEBUGASSERT(sem->semcount < SEM_VALUE_MAX); nxsem_releaseholder(sem); sem->semcount++; diff --git a/sched/semaphore/sem_wait.c b/sched/semaphore/sem_wait.c index 0382d5c554..96adcdd6f8 100644 --- a/sched/semaphore/sem_wait.c +++ b/sched/semaphore/sem_wait.c @@ -128,7 +128,7 @@ int nxsem_wait(FAR sem_t *sem) * semaphore */ - ASSERT(rtcb->waitsem == NULL); + DEBUGASSERT(rtcb->waitsem == NULL); /* Handle the POSIX semaphore (but don't set the owner yet) */ diff --git a/sched/signal/sig_action.c b/sched/signal/sig_action.c index 7c0cf241f2..30d524f611 100644 --- a/sched/signal/sig_action.c +++ b/sched/signal/sig_action.c @@ -92,7 +92,7 @@ static FAR sigactq_t *nxsig_alloc_action(void) /* And try again */ sigact = (FAR sigactq_t *)sq_remfirst(&g_sigfreeaction); - ASSERT(sigact); + DEBUGASSERT(sigact); } return sigact; diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 67f834a75f..1cfe1b97c0 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -227,8 +227,8 @@ static FAR sigpendq_t * * ****************************************************************************/ -static FAR sigpendq_t *nxsig_add_pendingsignal(FAR struct tcb_s *stcb, - FAR siginfo_t *info) +static void nxsig_add_pendingsignal(FAR struct tcb_s *stcb, + FAR siginfo_t *info) { FAR struct task_group_s *group; FAR sigpendq_t *sigpend; @@ -240,7 +240,7 @@ static FAR sigpendq_t *nxsig_add_pendingsignal(FAR struct tcb_s *stcb, /* Check if the signal is already pending for the group */ sigpend = nxsig_find_pendingsignal(group, info->si_signo); - if (sigpend) + if (sigpend != NULL) { /* The signal is already pending... retain only one copy */ @@ -254,7 +254,7 @@ static FAR sigpendq_t *nxsig_add_pendingsignal(FAR struct tcb_s *stcb, /* Allocate a new pending signal entry */ sigpend = nxsig_alloc_pendingsignal(); - if (sigpend) + if (sigpend != NULL) { /* Put the signal information into the allocated structure */ @@ -268,7 +268,7 @@ static FAR sigpendq_t *nxsig_add_pendingsignal(FAR struct tcb_s *stcb, } } - return sigpend; + DEBUGASSERT(sigpend); } /**************************************************************************** @@ -338,7 +338,7 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info) else { leave_critical_section(flags); - ASSERT(nxsig_add_pendingsignal(stcb, info)); + nxsig_add_pendingsignal(stcb, info); } } diff --git a/sched/signal/sig_suspend.c b/sched/signal/sig_suspend.c index abdbfed56c..242596c419 100644 --- a/sched/signal/sig_suspend.c +++ b/sched/signal/sig_suspend.c @@ -126,7 +126,7 @@ int sigsuspend(FAR const sigset_t *set) unblocksigno = nxsig_lowest(&intersection); sigpend = nxsig_remove_pendingsignal(rtcb, unblocksigno); - ASSERT(sigpend); + DEBUGASSERT(sigpend); nxsig_release_pendingsignal(sigpend); leave_critical_section(flags); diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c index 20dd13de3a..8503afe855 100644 --- a/sched/task/task_spawnparms.c +++ b/sched/task/task_spawnparms.c @@ -177,7 +177,7 @@ void spawn_semtake(FAR sem_t *sem) do { ret = nxsem_wait(sem); - ASSERT(ret == 0 || ret == -EINTR); + DEBUGASSERT(ret == 0 || ret == -EINTR); } while (ret == -EINTR); } diff --git a/sched/wdog/wd_cancel.c b/sched/wdog/wd_cancel.c index 34655013a2..0ae79eccde 100644 --- a/sched/wdog/wd_cancel.c +++ b/sched/wdog/wd_cancel.c @@ -108,7 +108,7 @@ int wd_cancel(WDOG_ID wdog) * error has occurred because the watchdog is marked active! */ - ASSERT(curr); + DEBUGASSERT(curr); /* If there is a watchdog in the timer queue after the one that * is being canceled, then it inherits the remaining ticks.