"printf()" from ISR worked consistently? Huh?

Peter Dufault dufault at hda.com
Wed Aug 18 20:13:05 UTC 2021


I've been porting some old code to rtems-6 and I had a "logtxt()" function that I'd used for years that was callable from an ISR - it buffered up the info and sent it to a task to log.

I didn't realize that the old library had a fall-back "logtxt()" that used printf() that I'd over-ridden in the applications where I'd been using it.  A lot of things weren't working right yet, but "logtxt()" appeared to be working just fine.  More things started working once I replaced "logtxt()" with a version that used "printk()".

How could printf() from an ISR work at all, let alone seem to work well?  The "logtxt()" was only to the console, maybe that's why.

Also, is there an equivalent to the VxWorks "in_isr()" for a simple-minded "logtxt()" that switches between printk() and printf()?


Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.rtems.org/pipermail/users/attachments/20210818/a3f87c4f/attachment.bin>


More information about the users mailing list