From 4f1f3e836393304434130d362771a39f6f8f859a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 24 Mar 2013 15:00:20 -0700 Subject: altos: Do not release interrupts from any pollchar function getchar relies on interrupts being blocked across the pollchar calls and into the sleep call or it may go to sleep with data pending. This prefixes all pollchar functions with _ to indicate that they are to be called with interrupts blocked and eliminates all interrupt manipulation calls from within the pollchar functions. Signed-off-by: Keith Packard --- src/core/ao.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/ao.h') diff --git a/src/core/ao.h b/src/core/ao.h index e3161b4c..6c790f69 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -638,7 +638,7 @@ ao_monitor_init(void) __reentrant; #define AO_READ_AGAIN (-1) struct ao_stdio { - int (*pollchar)(void); + int (*_pollchar)(void); /* Called with interrupts blocked */ void (*putchar)(char c) __reentrant; void (*flush)(void); uint8_t echo; -- cgit v1.2.3