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: Problems with printf() and diag_printf()


On Mon, Apr 22, 2002 at 07:29:17PM +0800, Andrew Lai wrote:
> Hi all,
> 
> Have been having trouble with printf and diag_printf() subroutines, I've 
> been using.  This occurs with the twothreads.c example that has been 
> distributed with eCos.
> 
> 
> The following code fragment in twothreads.c:
> 
>      cyg_mutex_lock(&cliblock); {
>        printf("\nThread %d: and now a delay of %d clock ticks(%d)\n",
> 	     message, delay,x);
>      }
>      cyg_mutex_unlock(&cliblock);
> 
> 
> It produces the following output which is clearly wrong:
> 
> Thread 0 w and now a delay of
> now a delay of
> 
> 
> Note how the characters are being dropped intermittently.

You have not told us what platform this is on and how you have
configured the serial port. What sort of flow control are you using?
What host do you have displaying the text from the serial port? A ZX81
or a cray supercomputer?

   Andrew

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


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