File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 3333#include "os-impl-console.h"
3434
3535#include "os-shared-printf.h"
36+ #include "os-shared-common.h"
3637
3738/*
3839 * By default the console output is always asynchronous
@@ -90,7 +91,9 @@ static void *OS_ConsoleTask_Entry(void *arg)
9091
9192 local_arg .opaque_arg = arg ;
9293 local = & OS_impl_console_table [local_arg .idx ];
93- while (true)
94+
95+ /* Loop forever (unless shutdown is set) */
96+ while (OS_SharedGlobalVars .ShutdownFlag != OS_SHUTDOWN_MAGIC_NUMBER )
9497 {
9598 OS_ConsoleOutput_Impl (local_arg .idx );
9699 sem_wait (& local -> data_sem );
Original file line number Diff line number Diff line change 3838#include "os-rtems.h"
3939#include "os-shared-printf.h"
4040#include "os-shared-idmap.h"
41+ #include "os-shared-common.h"
4142
4243/****************************************************************************************
4344 DEFINES
@@ -115,7 +116,9 @@ static void OS_ConsoleTask_Entry(rtems_task_argument arg)
115116 OS_impl_console_internal_record_t * local ;
116117
117118 local = & OS_impl_console_table [local_id ];
118- while (true)
119+
120+ /* Loop forever (unless shutdown is set) */
121+ while (OS_SharedGlobalVars .ShutdownFlag != OS_SHUTDOWN_MAGIC_NUMBER )
119122 {
120123 OS_ConsoleOutput_Impl (local_id );
121124 rtems_semaphore_obtain (local -> data_sem , RTEMS_WAIT , RTEMS_NO_TIMEOUT );
Original file line number Diff line number Diff line change 3232#include "os-impl-console.h"
3333
3434#include "os-shared-printf.h"
35+ #include "os-shared-common.h"
3536
3637/****************************************************************************************
3738 DEFINES
@@ -98,7 +99,9 @@ int OS_VxWorks_ConsoleTask_Entry(int arg)
9899 OS_impl_console_internal_record_t * local ;
99100
100101 local = & OS_impl_console_table [local_id ];
101- while (true)
102+
103+ /* Loop forever (unless shutdown is set or semTake fails) */
104+ while (OS_SharedGlobalVars .ShutdownFlag != OS_SHUTDOWN_MAGIC_NUMBER )
102105 {
103106 OS_ConsoleOutput_Impl (local_id );
104107 if (semTake (local -> datasem , WAIT_FOREVER ) == ERROR )
You can’t perform that action at this time.
0 commit comments