diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-01-23 11:13:19 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-02-02 10:46:42 -0500 |
commit | 5beceaae5c57dcf1b92d1def5954ac331a19a63a (patch) | |
tree | 17f394911623c9854b29329be532a1aedde857f2 /src/avr/serial.c | |
parent | 9c1bf1387c90ab7d5937bb210730acad10a4ba19 (diff) | |
download | kutter-5beceaae5c57dcf1b92d1def5954ac331a19a63a.tar.gz kutter-5beceaae5c57dcf1b92d1def5954ac331a19a63a.tar.xz kutter-5beceaae5c57dcf1b92d1def5954ac331a19a63a.zip |
io.h: read/write[bwl] should use barrier
Add barrier() calls to low-level read/write io calls so that their
callers don't need to.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr/serial.c')
-rw-r--r-- | src/avr/serial.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/avr/serial.c b/src/avr/serial.c index 0b5fea1f..32619ecc 100644 --- a/src/avr/serial.c +++ b/src/avr/serial.c @@ -126,12 +126,10 @@ console_get_output(uint8_t len) return NULL; // Disable TX irq and move buffer writeb(&transmit_max, 0); - barrier(); tpos = readb(&transmit_pos); tmax -= tpos; memmove(&transmit_buf[0], &transmit_buf[tpos], tmax); writeb(&transmit_pos, 0); - barrier(); writeb(&transmit_max, tmax); enable_tx_irq(); return &transmit_buf[tmax]; @@ -141,7 +139,6 @@ console_get_output(uint8_t len) void console_push_output(uint8_t len) { - barrier(); writeb(&transmit_max, readb(&transmit_max) + len); enable_tx_irq(); } |