summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/console/inch.c
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2016-10-12 09:40:41 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2016-10-17 09:41:58 +0200
commit6b54dcbbef6a003ae4c5fb9ae77f2f261f82dbf9 (patch)
tree944e6955408a0b4cfe093beabab1fb67a2d91efe /c/src/lib/libbsp/i386/pc386/console/inch.c
parentbsp/atsamv: Fix typo (diff)
downloadrtems-6b54dcbbef6a003ae4c5fb9ae77f2f261f82dbf9.tar.bz2
bsps/i386: replace global interrupt disable by SMP build supporting locking.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/inch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/console/inch.c b/c/src/lib/libbsp/i386/pc386/console/inch.c
index 047269e4f0..f5d5079236 100644
--- a/c/src/lib/libbsp/i386/pc386/console/inch.c
+++ b/c/src/lib/libbsp/i386/pc386/console/inch.c
@@ -260,13 +260,17 @@ int BSP_wait_polled_input(void)
int rtems_kbpoll( void )
{
int rc;
- rtems_interrupt_level level;
- rtems_interrupt_disable(level);
+ /*
+ * The locking or disable of interrupts does not help
+ * there because if interrupts are enabled after leave of this
+ * function the state can change without notice anyway.
+ */
+ RTEMS_COMPILER_MEMORY_BARRIER();
rc = ( kbd_first != kbd_last ) ? TRUE : FALSE;
- rtems_interrupt_enable(level);
+ RTEMS_COMPILER_MEMORY_BARRIER();
return rc;
}