I have troubles that the output of printf does not always show on the
   console.

   for(int i = 0; i<500; i++)
   {
      printf("this is my output. 01234567890123.....\n");
   }

   After 240 lines, the output stops in the middle of the sentence without
   a carriage return. The output of later printf calls appears after that.
   Same behaviour when I compile the app for debug or release. Calling
   fflush(stdout) does not make a difference.
   My app links a shared object which controls a rtdm device driver.
   The app and the shared object link xenomai and use the printf that is
   wrapped by xenomai.
   I couldn't reproduce it with a minimal cpp example.

   When I add rt_task_sleep(1000*1000) the output is Ok.

   When I start the app, I use the command line options
   --print-buffer-size=16384 --print-buffer-count=4
   --print-sync-delay=100. When i use print-buffer-size multiplied by 10,
   the output is Ok.

   Is this the normal behavior? This is difficult for me, as I use printf
   for debugging. Printf never returned a negative number, so I can't
   detect the problem in the code.

   I'm running cobalt (dual kernel).

   cat /proc/xenomai/version
   3.0.4

   ipipe
   ipipe-core-4.4.43-x86-6.patch

   uname -a
   Linux my_pc 4.4.43 #1 SMP Tue May 9 13:34:48 CEST 2017 x86_64 GNU/Linux


   Regards

   Chris
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to