[PATCH] termios: Make rtems_termios_ttyMutex private
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Aug 3 09:49:45 UTC 2020
This mutex is used to maintain termios internal data structures.
---
cpukit/include/rtems/termiostypes.h | 2 --
cpukit/libcsupport/src/termios.c | 3 +++
cpukit/libcsupport/src/termiosinitialize.c | 2 --
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cpukit/include/rtems/termiostypes.h b/cpukit/include/rtems/termiostypes.h
index 6930e5958b..ef2c958271 100644
--- a/cpukit/include/rtems/termiostypes.h
+++ b/cpukit/include/rtems/termiostypes.h
@@ -596,8 +596,6 @@ int rtems_termios_poll(
#define RTEMS_TERMIOS_NUMBER_BAUD_RATES 25
-extern rtems_mutex rtems_termios_ttyMutex;
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index 75925cf8ec..829c2bf158 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -113,6 +113,9 @@ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument);
#define TERMIOS_RX_PROC_EVENT RTEMS_EVENT_1
#define TERMIOS_RX_TERMINATE_EVENT RTEMS_EVENT_0
+static rtems_mutex rtems_termios_ttyMutex =
+ RTEMS_MUTEX_INITIALIZER( "termios" );
+
static void
rtems_termios_obtain (void)
{
diff --git a/cpukit/libcsupport/src/termiosinitialize.c b/cpukit/libcsupport/src/termiosinitialize.c
index 2aeba89ecc..2ea34f08b3 100644
--- a/cpukit/libcsupport/src/termiosinitialize.c
+++ b/cpukit/libcsupport/src/termiosinitialize.c
@@ -24,8 +24,6 @@
#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,
--
2.26.2
More information about the devel
mailing list