Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Meadow OS, if included in build, diagnostic code outputs PID of new threads. Can this be simplify? #806

Open
Peter-Moody opened this issue Dec 31, 2024 · 0 comments

Comments

@Peter-Moody
Copy link

Peter-Moody commented Dec 31, 2024

Describe the bug
The original request

The PID output code which we repeat over and over. I’d like us to look at doing something about the fact that we repeat the same three lines.

For reference the "same three lines" are in Meadow OS 28 times and look like one of the following:

#if HCOM_DIAG_OUTPUT_SYSLOG_PID_OF_NEW_THREADS > 0
    syslog(2, "New pthread [PID:%d],'%s'\n", getpid(), "hcom_mono_control");
#endif

#if HCOM_DIAG_OUTPUT_SYSLOG_PID_OF_NEW_THREADS > 0
  syslog(2, "New kthread [PID:%d],'%s'\n", getpid(), MEADOW_TIMER_EXPERIMENT_THREAD_NAME);
#endif

Please note that the code is only included in the build if in
/nuttx/include/meadow/hcom_shared_common.h the following is set to '1'
#define HCOM_DIAG_OUTPUT_SYSLOG_PID_OF_NEW_THREADS 0

@Peter-Moody Peter-Moody changed the title In Meadow OS optional diagnostic code reports the PID of any new thread In Meadow OS, if included in build, diagnostic code outputs PID of new threads. Can this be simplify? Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant