RTEMS | Draft: rtems/bsps: Test software code placed inside #if #endif (!1078)

Samuel Viegas (@samuel.viegas) gitlab at rtems.org
Tue May 5 14:23:49 UTC 2026




Samuel Viegas commented on a discussion on bsps/sparc/leon3/start/eirq.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1078#note_149483

 >      }
 >    } else {
 > -    rtems_interrupt_lock_context lock_context;
 > -    uint32_t ipend;
 > -
 > -    /*
 > -     * This is a very dangerous operation and should only be used for test
 > -     * software.  We may accidentally clear the pending state set by
 > -     * peripherals with this read-modify-write operation.
 > -     */
 > -    LEON3_IRQCTRL_ACQUIRE(&lock_context);
 > -    ipend = grlib_load_32(&regs->ipend);
 > -    ipend |= bit;
 > -    grlib_store_32(&regs->ipend, ipend);
 > -    LEON3_IRQCTRL_RELEASE(&lock_context);
 > +    #if defined(RTEMS_TEST)

Ok, in that case I will remove RTEMS_TEST and keep the code as it was. I was following a suggestion left in ticket #4846 which said: _"This warning is pretty useless since it is invisible to the user. The hardware limitations are documented in the hardware manuals. We could introduce some sort of a test mode which guards this feature."_.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1078#note_149483
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260505/8ec0e085/attachment-0001.htm>


More information about the bugs mailing list