diff options
| author | Keith Packard <keithp@keithp.com> | 2010-05-05 01:31:57 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-05-05 01:33:25 -0700 | 
| commit | e6bb80975fde20928a830170f0821d59a8c72690 (patch) | |
| tree | c69580b5a76de9608f93e5ba0fe26313fe1c7d2a /src | |
| parent | ff03cdf746b83542ebcca00d32e6cc69ccfc122d (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')
| -rw-r--r-- | src/ao_packet_master.c | 2 | ||||
| -rw-r--r-- | src/ao_stdio.c | 4 | ||||
| -rw-r--r-- | src/ao_usb.c | 2 | 
3 files changed, 3 insertions, 5 deletions
diff --git a/src/ao_packet_master.c b/src/ao_packet_master.c index a499ce59..ef86fa28 100644 --- a/src/ao_packet_master.c +++ b/src/ao_packet_master.c @@ -18,7 +18,7 @@  #include "ao.h"  static char -ao_packet_getchar(void) +ao_packet_getchar(void) __critical  {  	char c;  	while ((c = ao_packet_pollchar()) == AO_READ_AGAIN) 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;  } diff --git a/src/ao_usb.c b/src/ao_usb.c index 527e9b30..e4af8e45 100644 --- a/src/ao_usb.c +++ b/src/ao_usb.c @@ -395,7 +395,7 @@ ao_usb_pollchar(void) __critical  }  char -ao_usb_getchar(void) +ao_usb_getchar(void) __critical  {  	char	c;  | 
