Skip to contentSkip to conversation

rt_print_auto_init()

Xenomai Philippe Gerum 3 participants 12 messages Jul 23, 2015 – Jul 24, 2015

lore
Share & tools
lore
#0 lore raw

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Signature · 1 line
Philippe.
#1 lore raw
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#2 lore raw
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Signature · 1 line
Philippe.
#3 lore raw
Quoted 13 lines · Philippe Gerum
Quoted 12 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

Quoted 8 lines
Quoted 4 lines

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Ack.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#11 lore raw
In reply to Philippe Gerum
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

At some point, I added a pre-allocation of a few buffers which avoided the need for malloc, and forced the call to rt_print_auto_init(true) in the POSIX skin library. I do not know whether all this has survived the Xenomai 3 cleanup though.

Signature · 2 lines
                                            Gilles.
https://click-hack.org
#4 lore raw
In reply to Jan Kiszka
Quoted 19 lines · Jan Kiszka
Quoted 18 lines · Philippe Gerum
Quoted 16 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Quoted 6 lines
Quoted 3 lines

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

Signature · 1 line
Philippe.
#5 lore raw
Quoted 24 lines · Philippe Gerum
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Quoted 7 lines
Quoted 2 lines

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

I used to have one recently that was specifically interested in terminating the associated thread. But that case was modified later on due to other reasons. In principle, the value of this cleanup function is in the printer thread control, even if that means cutting of wrapped I/O (you could still print via unwrapped services then).

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#6 lore raw
Quoted 33 lines · Jan Kiszka
Quoted 24 lines · Philippe Gerum
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Quoted 7 lines
Quoted 2 lines

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

Quoted 6 lines

I used to have one recently that was specifically interested in terminating the associated thread. But that case was modified later on due to other reasons. In principle, the value of this cleanup function is in the printer thread control, even if that means cutting of wrapped I/O (you could still print via unwrapped services then).

Ok. Was it part of a broader feature aimed at moving the per-process rt support to a quiescent state?

Signature · 1 line
Philippe.
#7 lore raw
Quoted 41 lines · Philippe Gerum
Quoted 33 lines · Jan Kiszka
Quoted 24 lines · Philippe Gerum
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Quoted 7 lines
Quoted 2 lines

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

Quoted 6 lines

I used to have one recently that was specifically interested in terminating the associated thread. But that case was modified later on due to other reasons. In principle, the value of this cleanup function is in the printer thread control, even if that means cutting of wrapped I/O (you could still print via unwrapped services then).

Quoted 2 lines

Ok. Was it part of a broader feature aimed at moving the per-process rt support to a quiescent state?

No, rather about ensuring that if you terminate only the main thread in an application that believes this thread was the last one, the application as a whole terminates.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#8 lore raw
Quoted 42 lines · Jan Kiszka
Quoted 41 lines · Philippe Gerum
Quoted 39 lines · Jan Kiszka
Quoted 24 lines · Philippe Gerum
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Quoted 7 lines
Quoted 2 lines

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

I used to have one recently that was specifically interested in terminating the associated thread. But that case was modified later on due to other reasons. In principle, the value of this cleanup function is in the printer thread control, even if that means cutting of wrapped I/O (you could still print via unwrapped services then).

Quoted 7 lines
Quoted 2 lines

Ok. Was it part of a broader feature aimed at moving the per-process rt support to a quiescent state?

No, rather about ensuring that if you terminate only the main thread in an application that believes this thread was the last one, the application as a whole terminates.

We could probably tell the existing atexit() handler to wipe the helper thread too.

Signature · 1 line
Philippe.
#9 lore raw
Quoted 46 lines · Philippe Gerum
Quoted 45 lines · Jan Kiszka
Quoted 43 lines · Philippe Gerum
Quoted 33 lines · Jan Kiszka
Quoted 24 lines · Philippe Gerum
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Quoted 7 lines
Quoted 2 lines

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

Quoted 6 lines

I used to have one recently that was specifically interested in terminating the associated thread. But that case was modified later on due to other reasons. In principle, the value of this cleanup function is in the printer thread control, even if that means cutting of wrapped I/O (you could still print via unwrapped services then).

Ok. Was it part of a broader feature aimed at moving the per-process rt support to a quiescent state?

Quoted 8 lines
Quoted 4 lines

No, rather about ensuring that if you terminate only the main thread in an application that believes this thread was the last one, the application as a whole terminates.

We could probably tell the existing atexit() handler to wipe the helper thread too.

mm, no. This would not exit, precisely.

Signature · 1 line
Philippe.
#10 lore raw
Quoted 52 lines · Philippe Gerum
Quoted 51 lines · Philippe Gerum
Quoted 49 lines · Jan Kiszka
Quoted 41 lines · Philippe Gerum
Quoted 33 lines · Jan Kiszka
Quoted 24 lines · Philippe Gerum
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 8 lines · Jan Kiszka
Quoted 6 lines · Philippe Gerum

Hi Jan,

Do you still have a use case for calling rt_print_auto_init(false) or not calling rt_print_auto_init(true) from libcobalt's bootstrap code?

Quoted 8 lines

Huh, that was a day-one feature, now 8 years old, barely remember the details. I'm currently not aware of a concrete scenario. It definitely makes sense to revisit this think.

I guess one, if not the major problem back then was that the implicit malloc of the initialization step was not consistently causing a SIGDEBUG warning. That is now different.

Since the current thread won't be notified until XNWARN is armed in its TCB, any objection to move that call as a nop placeholder to the compat section in libtrank, leaving the implicit init to libcobalt as currently?

Quoted 7 lines
Quoted 2 lines

Ack.

Ok, let's see how deep you can dive into your context stack these days:
what about rt_print_cleanup() now? I see no in-tree callers, and I wonder whether there is any use case for an application to stop the stdio support during runtime.

Quoted 6 lines

I used to have one recently that was specifically interested in terminating the associated thread. But that case was modified later on due to other reasons. In principle, the value of this cleanup function is in the printer thread control, even if that means cutting of wrapped I/O (you could still print via unwrapped services then).

Quoted 2 lines

Ok. Was it part of a broader feature aimed at moving the per-process rt support to a quiescent state?

No, rather about ensuring that if you terminate only the main thread in an application that believes this thread was the last one, the application as a whole terminates.

Quoted 6 lines
Quoted 3 lines

We could probably tell the existing atexit() handler to wipe the helper thread too.

mm, no. This would not exit, precisely.

However, we do have a TSD on the main thread, so signaling the helper from the TSD destructor would do.

Signature · 1 line
Philippe.