Ning Yang commented on a discussion on bsps/shared/dev/serial/arm-pl011.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111105 > + size_t n > +) > +{ > + arm_pl011_context *context = (arm_pl011_context *) base; > + volatile pl011_base *regs = arm_pl011_get_regs(base); > + size_t i = 0; > + > + if (n > 0) { > + arm_pl011_enable_irq(regs, PL011_UARTI_TXI); > + /* > + * When write_buffer writes the first character, if txfifo is full, > + * it will return directly. This will cause this character to be lost. > + * If txfifo is full, wait for it to be not full. > + */ > + while (arm_pl011_is_txfifo_full(regs)); > + while (!arm_pl011_is_txfifo_full(regs) && i < n) { I added `volatile` to `regs` in line 450. Will it work in line 461? Is it correct to use `volatile` in this way? -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111105 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list bugs@rtems.org http://lists.rtems.org/mailman/listinfo/bugs