This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Printf and diag_printf


On Mon, Nov 22, 2004 at 04:19:11PM +0100, Michele Portolan wrote:
> What is the difference between "print" and "diag_printf"?
> I noticed the latter seems to be quite less constrained (ex: I can use it
> from an ISR handler), what doesit have more (or less) than normal printf? At
> first sight it would seem much more useful, but I bet there is a catch I am
> not seeing!

diag_printf() is none realtime. It disables interrupts while doing its
printing. So if you have a low priority function doing a diag_printf
it will stop a high priority function taking over when it becomes
runnable. This can be really bad when you are using a slow serial
port. It can give you some huge latencies.

diag_printf also has a few less modifiers and types implemented.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]