summaryrefslogtreecommitdiff
path: root/src/ao_stdio.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-05 01:31:57 -0700
committerKeith Packard <keithp@keithp.com>2010-05-05 01:33:25 -0700
commite6bb80975fde20928a830170f0821d59a8c72690 (patch)
treec69580b5a76de9608f93e5ba0fe26313fe1c7d2a /src/ao_stdio.c
parentff03cdf746b83542ebcca00d32e6cc69ccfc122d (diff)
Fix all stdio reading functions to be __critical
Oh, right SDCC has '__critical' to mark sections of code that need to run with interrupts disabled; no need to use EA = 0 and EA = 1. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_stdio.c')
-rw-r--r--src/ao_stdio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ao_stdio.c b/src/ao_stdio.c
index 045dff09..78bbd3c3 100644
--- a/src/ao_stdio.c
+++ b/src/ao_stdio.c
@@ -45,12 +45,11 @@ flush(void)
__xdata uint8_t ao_stdin_ready;
char
-getchar(void) __reentrant
+getchar(void) __reentrant __critical
{
char c;
int8_t stdio = ao_cur_stdio;
- EA = 0;
for (;;) {
c = stdios[stdio].pollchar();
if (c != AO_READ_AGAIN)
@@ -60,7 +59,6 @@ getchar(void) __reentrant
if (stdio == ao_cur_stdio)
ao_sleep(&ao_stdin_ready);
}
- EA = 1;
ao_cur_stdio = stdio;
return c;
}