On 19/02/2020 05:57, Chris Johns wrote:
On 18/2/20 7:33 pm, Sebastian Huber wrote:
On 18/02/2020 01:25, chr...@rtems.org wrote:
From: Chris Johns <chr...@rtems.org>
- Newlib overtites any FILE pointers set in stdin, stdout or stderr.
Closes #3870
[...]
The worker_task in newlib01 has different pointers and fd numbers for it's
stdout, stdin and stderr and `fprintf(stdout, "...");` does not appear on the
console while it does in the `test()` body. I am not sure about this. The change
to add `__sinit` does not change this, it is the same in or out.
I had a look at this with the debugger. It seems to work since the
_close hander is NULL:
(gdb) p _Per_CPU_Information [0].per_cpu .executing [0].libc_reent
[0]._stdin[0]
$4 = {
_p = 0x0,
_r = 0,
_w = 0,
_flags = 4,
_file = 0,
[...]
_close = 0x0,
For other files, it looks like:
(gdb) p file[0]
$5 = {
_p = 0x0,
_r = 0,
_w = 0,
_flags = 16,
_file = 3,
[...]
_close = 0x11e0f9 <__sclose>,
So, it looks good.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel