This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Printf and diag_printf
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Michele Portolan" <michele dot Portolan at imag dot fr>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: 22 Nov 2004 15:38:49 +0000
- Subject: Re: [ECOS] Printf and diag_printf
- References: <072501c4d0a6$9e7a9a00$4881ab93@TIMAQLF129>
"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