[rtems commit] termios: Move default lock functions

Sebastian Huber sebh at rtems.org
Wed Nov 7 12:00:06 UTC 2018


Module:    rtems
Branch:    master
Commit:    e292beba32311b69591815701688997720866668
Changeset: http://git.rtems.org/rtems/commit/?id=e292beba32311b69591815701688997720866668

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov  7 10:47:48 2018 +0100

termios: Move default lock functions

Move rtems_termios_device_lock_acquire_default() and
rtems_termios_device_lock_release_default() to a file separate from the
general Termios support.  This avoids complex dependencies in printk()
only scenarios.

---

 cpukit/libcsupport/src/termios.c           | 18 ------------------
 cpukit/libcsupport/src/termiosinitialize.c | 18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index 7cf8ca6..0fc9de45 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -344,24 +344,6 @@ deviceReleaseMutex(
   rtems_mutex_unlock (&ctx->lock.mutex);
 }
 
-void
-rtems_termios_device_lock_acquire_default(
-  rtems_termios_device_context *ctx,
-  rtems_interrupt_lock_context *lock_context
-)
-{
-  rtems_interrupt_lock_acquire (&ctx->lock.interrupt, lock_context);
-}
-
-void
-rtems_termios_device_lock_release_default(
-  rtems_termios_device_context *ctx,
-  rtems_interrupt_lock_context *lock_context
-)
-{
-  rtems_interrupt_lock_release (&ctx->lock.interrupt, lock_context);
-}
-
 static rtems_termios_tty *
 rtems_termios_open_tty(
   rtems_device_major_number      major,
diff --git a/cpukit/libcsupport/src/termiosinitialize.c b/cpukit/libcsupport/src/termiosinitialize.c
index f89b8d1..992ed38 100644
--- a/cpukit/libcsupport/src/termiosinitialize.c
+++ b/cpukit/libcsupport/src/termiosinitialize.c
@@ -25,3 +25,21 @@
 #include <rtems/termiostypes.h>
 
 rtems_mutex rtems_termios_ttyMutex = RTEMS_MUTEX_INITIALIZER( "termios" );
+
+void
+rtems_termios_device_lock_acquire_default(
+  rtems_termios_device_context *ctx,
+  rtems_interrupt_lock_context *lock_context
+)
+{
+  rtems_interrupt_lock_acquire (&ctx->lock.interrupt, lock_context);
+}
+
+void
+rtems_termios_device_lock_release_default(
+  rtems_termios_device_context *ctx,
+  rtems_interrupt_lock_context *lock_context
+)
+{
+  rtems_interrupt_lock_release (&ctx->lock.interrupt, lock_context);
+}




More information about the vc mailing list