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


"Michele Portolan" <michele.Portolan@imag.fr> writes:

> 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 a low level routine that prints directly to the
debug channel. It doesn't go through the C library, and can be used in
DSRs and ISRs where C library calls would cause problems. It is used
for tracing and assertions, and for system level diagnostics, where
the presence of the C library cannot be assumed.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
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]