This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: regarding printfs
- From: Suheel Hussain <suheelh at nc dot rr dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 25 Nov 2003 22:56:25 -0500
- Subject: [ECOS] Re: regarding printfs
Hi Vinay,
Most printfs works like this:
the printf output is generally sent to a console or std serial output
device. When printf is invoked, the function generates a character string,
from argument specified in printf call, and sends generated string to serial
device.
In some systems, serial driver copies this string into its local buffers and
sends it to device when possible -- i.e., asynchronous or non-blocking mode.
In other implementation serial driver blocks printf until all string
characters are successfully sent -- i.e., blocking mode.
From your description it seems like you have timing issue. The printf call
may generate enough delay to make system "work." BTW, your
application/program should not have to do a mutex lock during printf, the
serial driver should make sure that buffering is done atomically.
Hope this helps.
--
Suheel Hussain
Main #: (919) 676-7568
Mobile #: (919) 624-0901
suheelh@nc.rr.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss