[RTEMS Project] #3012: Global C++ IO streams are broken (cout, cin, cerr)

RTEMS trac trac at rtems.org
Thu Jun 22 06:36:49 UTC 2017

#3012: Global C++ IO streams are broken (cout, cin, cerr)
 Reporter:  Sebastian Huber  |       Owner:  Chris Johns
     Type:  defect           |      Status:  assigned
 Priority:  normal           |   Milestone:  Indefinite
Component:  GCC              |     Version:  4.12
 Severity:  normal           |  Resolution:
 Keywords:                   |

Comment (by Sebastian Huber):

 Maybe we could add an RTEMS-specific change to Newlib so that we still
 have the thread-local stdio streams, but we initialize them to global FILE
 objects by default, e.g. remove struct _reent::__sf for RTEMS. This would
 also reduce the amount of per-thread storage.

 If we do this, then we have to be careful with fclose(), since this would
 close the FILE for all threads. There is no reference counting in the FILE

Ticket URL: <http://devel.rtems.org/ticket/3012#comment:6>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list