diff --git a/arch/sim/src/sim/up_idle.c b/arch/sim/src/sim/up_idle.c index 6d86875420b..91f082f0294 100644 --- a/arch/sim/src/sim/up_idle.c +++ b/arch/sim/src/sim/up_idle.c @@ -132,7 +132,7 @@ void up_idle(void) nxsched_process_timer(); #endif -#if defined(CONFIG_DEV_CONSOLE) && !defined(CONFIG_SIM_UART_DATAPOST) +#ifdef CONFIG_DEV_CONSOLE /* Handle UART data availability */ if (g_uart_data_available) diff --git a/arch/sim/src/sim/up_internal.h b/arch/sim/src/sim/up_internal.h index 8db164d9643..c76a30bae88 100644 --- a/arch/sim/src/sim/up_internal.h +++ b/arch/sim/src/sim/up_internal.h @@ -98,10 +98,6 @@ # endif #endif -/* The design for how we signal UART data availability is up in the air */ - -#undef CONFIG_SIM_UART_DATAPOST - /* Context Switching Definitions ******************************************/ #if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32) @@ -208,7 +204,7 @@ extern volatile int g_eventloop; #endif #endif -#if defined(CONFIG_DEV_CONSOLE) && !defined(CONFIG_SIM_UART_DATAPOST) +#ifdef CONFIG_DEV_CONSOLE extern volatile int g_uart_data_available; #endif diff --git a/arch/sim/src/sim/up_simuart.c b/arch/sim/src/sim/up_simuart.c index 9e28179a10c..a42213b9bdb 100644 --- a/arch/sim/src/sim/up_simuart.c +++ b/arch/sim/src/sim/up_simuart.c @@ -53,10 +53,6 @@ #define SIMUART_BUFSIZE 256 -/* The design for how we signal UART data availability is up in the air */ - -#undef CONFIG_SIM_UART_DATAPOST - /**************************************************************************** * Private Data ****************************************************************************/ @@ -69,9 +65,7 @@ static volatile int g_uarttail; * Public Data ****************************************************************************/ -#ifndef CONFIG_SIM_UART_DATAPOST volatile int g_uart_data_available; -#endif /**************************************************************************** * NuttX Domain Public Function Prototypes @@ -142,9 +136,6 @@ static void *simuart_thread(void *arg) if (nread == 1) { -#ifdef CONFIG_SIM_UART_DATAPOST - sched_lock(); -#endif /* Get the index to the next slot in the UART buffer */ prev = g_uarthead; @@ -174,25 +165,9 @@ static void *simuart_thread(void *arg) * input. */ -#ifdef CONFIG_SIM_UART_DATAPOST - simuart_post(); -#else g_uart_data_available = 1; -#endif } } - -#ifdef CONFIG_SIM_UART_DATAPOST - /* REVISIT: This is very weird and scary here. When sched_unlock() - * is called, we may do a lonjmp() style context switch meaning - * that the logic will be run running on this thread! (but with a - * different stack). So we do not get back here until the task - * sleeps again. I can't help but believe that that is going to - * be a problem someday. - */ - - sched_unlock(); -#endif } }