All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Webb <jeff.webb@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Real-time printf in Xenomai 2.6.0
Date: Thu, 23 Feb 2012 17:07:14 -0600	[thread overview]
Message-ID: <4F46C6A2.5060905@domain.hid> (raw)
In-Reply-To: <4F46BD22.60404@domain.hid>

On 02/23/2012 04:26 PM, Gilles Chanteperdrix wrote:
> On 02/23/2012 11:02 PM, Jeff Webb wrote:
>> I was happy to see that printf now works from real-time POSIX threads in Xenomai 2.6.0.  Unfortunately, I'm seeing some strange behavior that surfaces when I try to print the string "\n" by itself.  When I run the attached example program, I get:
>>
>>     $ ./printf_test
>>     start
>>     CPU time limit exceeded
>>     $
>>
>> IfI replace the two printf calls with rt_printf calls and #include<rtdk.h>,I get the expected result:
>>
>>     $ ./rt_printf_test
>>     start
>>     1
>>     2
>>     3
>>     4
>>     ^C
>>     $
>>
>> The original example also works if these two lines:
>>
>>           printf("%d", count);
>>           printf("\n");
>>
>> are replaced with:
>>
>>           printf("%d\n", count);
>>
>> Can someone confirm if this a bug in Xenomai 2.6.0, something specific to my HW/SW installation, or some mistake in my test program?
>
> I would bet the call to printf is replaced with something else (such as
> putchar). Could you disassemble the test to check this?

Yes, it appears that putchar is called indeed.

> Note that I have fixed similar issues in xenomai-2.6 current repository,
> so you could give it a try.

I may give that a try.  Now that I have confirmed that putchar is the issue, do you think xenomai-2.6 current will fix the problem?  Is putchar now wrapped as well?  I noticed that puts appears to be wrapped from the disassembly output.

Thanks again for all the help,

Jeff


  reply	other threads:[~2012-02-23 23:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 16:03 [Xenomai-help] signal handling in Xenomai 2.6.0 Jeff Webb
2012-02-15 16:23 ` Gilles Chanteperdrix
2012-02-15 17:23   ` Jeff Webb
2012-02-23 22:02   ` [Xenomai-help] Real-time printf " Jeff Webb
2012-02-23 22:26     ` Gilles Chanteperdrix
2012-02-23 23:07       ` Jeff Webb [this message]
2012-02-23 23:14         ` Gilles Chanteperdrix
2012-04-15 17:42         ` Gilles Chanteperdrix
2012-04-17 22:22           ` Jeff Webb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F46C6A2.5060905@domain.hid \
    --to=jeff.webb@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.