Index: c/src/exec/libcsupport/src/termios.c
===================================================================
--- c/src/exec/libcsupport/src/termios.c	(revision 1d1b1507a6cc49166ab60b2e0963aa5f077bb1b0)
+++ c/src/exec/libcsupport/src/termios.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -142,52 +142,8 @@
 #define FL_MDXOF   0x400    /* output controlled with XON/XOFF protocol   */
 
-static struct rtems_termios_tty *ttyHead, *ttyTail;
-static rtems_id ttyMutex;
-
-/*
- *  Reserve enough resources to open every physical device once.
- */
-
-static int first_time;   /* assumed to be zeroed by BSS initialization */
-
-void
-rtems_termios_reserve_resources (
-  rtems_configuration_table *configuration,
-  rtems_unsigned32           number_of_devices
-  )
-{
-	rtems_api_configuration_table *rtems_config;
-
-	if (!configuration)
-		rtems_fatal_error_occurred (0xFFF0F001);
-	rtems_config = configuration->RTEMS_api_configuration;
-	if (!rtems_config)
-		rtems_fatal_error_occurred (0xFFF0F002);
-	if (!first_time)
-		rtems_config->maximum_semaphores += 1;
-	first_time = 1;
-	rtems_config->maximum_semaphores += (4 * number_of_devices);
-}
-
-void
-rtems_termios_initialize (void)
-{
-	rtems_status_code sc;
-
-	/*
-	 * Create the mutex semaphore for the tty list
-	 */
-	if (!ttyMutex) {
-		sc = rtems_semaphore_create (
-			rtems_build_name ('T', 'R', 'm', 'i'),
-			1,
-			RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-			RTEMS_NO_PRIORITY,
-			&ttyMutex);
-		if (sc != RTEMS_SUCCESSFUL)
-			rtems_fatal_error_occurred (sc);
-	}
-}
-	
+extern struct rtems_termios_tty *rtems_termios_ttyHead;
+extern struct rtems_termios_tty *rtems_termios_ttyTail;
+extern rtems_id rtems_termios_ttyMutex;
+
 /*
  * Open a termios device
@@ -208,8 +164,8 @@
 	 * See if the device has already been opened
 	 */
-	sc = rtems_semaphore_obtain (ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+	sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
 	if (sc != RTEMS_SUCCESSFUL)
 		return sc;
-	for (tty = ttyHead ; tty != NULL ; tty = tty->forw) {
+	for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
 		if ((tty->major == major) && (tty->minor == minor))
 			break;
@@ -223,11 +179,11 @@
 		tty = calloc (1, sizeof (struct rtems_termios_tty));
 		if (tty == NULL) {
-			rtems_semaphore_release (ttyMutex);
+			rtems_semaphore_release (rtems_termios_ttyMutex);
 			return RTEMS_NO_MEMORY;
 		}
-		tty->forw = ttyHead;
-		ttyHead = tty;
-		if (ttyTail == NULL)
-			ttyTail = tty;
+		tty->forw = rtems_termios_ttyHead;
+		rtems_termios_ttyHead = tty;
+		if (rtems_termios_ttyTail == NULL)
+			rtems_termios_ttyTail = tty;
 
 		tty->minor = minor;
@@ -318,5 +274,5 @@
 	if (!tty->refcount++ && tty->device.firstOpen)
 		(*tty->device.firstOpen)(major, minor, arg);
-	rtems_semaphore_release (ttyMutex);
+	rtems_semaphore_release (rtems_termios_ttyMutex);
 	return RTEMS_SUCCESSFUL;
 }
@@ -354,5 +310,5 @@
 	rtems_status_code sc;
 
-	sc = rtems_semaphore_obtain (ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+	sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
 	if (sc != RTEMS_SUCCESSFUL)
 		rtems_fatal_error_occurred (sc);
@@ -362,9 +318,9 @@
 			 (*tty->device.lastClose)(tty->major, tty->minor, arg);
 		if (tty->forw == NULL)
-			ttyTail = tty->back;
+			rtems_termios_ttyTail = tty->back;
 		else
 			tty->forw->back = tty->back;
 		if (tty->back == NULL)
-			ttyHead = tty->forw;
+			rtems_termios_ttyHead = tty->forw;
 		else
 			tty->back->forw = tty->forw;
@@ -376,5 +332,5 @@
 		free (tty);
 	}
-	rtems_semaphore_release (ttyMutex);
+	rtems_semaphore_release (rtems_termios_ttyMutex);
 	return RTEMS_SUCCESSFUL;
 }
Index: c/src/exec/libcsupport/src/termiosinitialize.c
===================================================================
--- c/src/exec/libcsupport/src/termiosinitialize.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
+++ c/src/exec/libcsupport/src/termiosinitialize.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -0,0 +1,50 @@
+/*
+ *  Termios initialization routine
+ *
+ *  Author:
+ *    W. Eric Norum
+ *    Saskatchewan Accelerator Laboratory
+ *    University of Saskatchewan
+ *    Saskatoon, Saskatchewan, CANADA
+ *    eric@skatter.usask.ca
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#include <rtems.h>
+#include <rtems.h>
+#include <rtems/libio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <unistd.h>
+
+struct rtems_termios_tty *rtems_termios_ttyHead;
+struct rtems_termios_tty *rtems_termios_ttyTail;
+rtems_id rtems_termios_ttyMutex;
+
+void
+rtems_termios_initialize (void)
+{
+  rtems_status_code sc;
+
+  /*
+   * Create the mutex semaphore for the tty list
+   */
+  if (!rtems_termios_ttyMutex) {
+    sc = rtems_semaphore_create (
+      rtems_build_name ('T', 'R', 'm', 'i'),
+      1,
+      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
+      RTEMS_NO_PRIORITY,
+      &rtems_termios_ttyMutex);
+    if (sc != RTEMS_SUCCESSFUL)
+      rtems_fatal_error_occurred (sc);
+  }
+}
Index: c/src/exec/libcsupport/src/termiosreserveresources.c
===================================================================
--- c/src/exec/libcsupport/src/termiosreserveresources.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
+++ c/src/exec/libcsupport/src/termiosreserveresources.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -0,0 +1,28 @@
+/*
+ *  Reserve enough resources to open every physical device once.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+
+static int first_time;   /* assumed to be zeroed by BSS initialization */
+
+void rtems_termios_reserve_resources (
+  rtems_configuration_table *configuration,
+  rtems_unsigned32           number_of_devices
+)
+{
+        rtems_api_configuration_table *rtems_config;
+
+        if (!configuration)
+                rtems_fatal_error_occurred (0xFFF0F001);
+        rtems_config = configuration->RTEMS_api_configuration;
+        if (!rtems_config)
+                rtems_fatal_error_occurred (0xFFF0F002);
+        if (!first_time)
+                rtems_config->maximum_semaphores += 1;
+        first_time = 1;
+        rtems_config->maximum_semaphores += (4 * number_of_devices);
+}
+
Index: c/src/lib/libc/Makefile.in
===================================================================
--- c/src/lib/libc/Makefile.in	(revision 1d1b1507a6cc49166ab60b2e0963aa5f077bb1b0)
+++ c/src/lib/libc/Makefile.in	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -29,5 +29,6 @@
 
 TERMIOS_PIECES= cfgetispeed cfgetospeed cfsetispeed cfsetospeed \
-  tcgetattr tcsetattr tcdrain termios 
+  tcgetattr tcsetattr tcdrain termios termiosinitialize \
+  termiosreserveresources
 
 SYSTEM_CALL_PIECES=\
Index: c/src/lib/libc/termios.c
===================================================================
--- c/src/lib/libc/termios.c	(revision 1d1b1507a6cc49166ab60b2e0963aa5f077bb1b0)
+++ c/src/lib/libc/termios.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -142,52 +142,8 @@
 #define FL_MDXOF   0x400    /* output controlled with XON/XOFF protocol   */
 
-static struct rtems_termios_tty *ttyHead, *ttyTail;
-static rtems_id ttyMutex;
-
-/*
- *  Reserve enough resources to open every physical device once.
- */
-
-static int first_time;   /* assumed to be zeroed by BSS initialization */
-
-void
-rtems_termios_reserve_resources (
-  rtems_configuration_table *configuration,
-  rtems_unsigned32           number_of_devices
-  )
-{
-	rtems_api_configuration_table *rtems_config;
-
-	if (!configuration)
-		rtems_fatal_error_occurred (0xFFF0F001);
-	rtems_config = configuration->RTEMS_api_configuration;
-	if (!rtems_config)
-		rtems_fatal_error_occurred (0xFFF0F002);
-	if (!first_time)
-		rtems_config->maximum_semaphores += 1;
-	first_time = 1;
-	rtems_config->maximum_semaphores += (4 * number_of_devices);
-}
-
-void
-rtems_termios_initialize (void)
-{
-	rtems_status_code sc;
-
-	/*
-	 * Create the mutex semaphore for the tty list
-	 */
-	if (!ttyMutex) {
-		sc = rtems_semaphore_create (
-			rtems_build_name ('T', 'R', 'm', 'i'),
-			1,
-			RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-			RTEMS_NO_PRIORITY,
-			&ttyMutex);
-		if (sc != RTEMS_SUCCESSFUL)
-			rtems_fatal_error_occurred (sc);
-	}
-}
-	
+extern struct rtems_termios_tty *rtems_termios_ttyHead;
+extern struct rtems_termios_tty *rtems_termios_ttyTail;
+extern rtems_id rtems_termios_ttyMutex;
+
 /*
  * Open a termios device
@@ -208,8 +164,8 @@
 	 * See if the device has already been opened
 	 */
-	sc = rtems_semaphore_obtain (ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+	sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
 	if (sc != RTEMS_SUCCESSFUL)
 		return sc;
-	for (tty = ttyHead ; tty != NULL ; tty = tty->forw) {
+	for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
 		if ((tty->major == major) && (tty->minor == minor))
 			break;
@@ -223,11 +179,11 @@
 		tty = calloc (1, sizeof (struct rtems_termios_tty));
 		if (tty == NULL) {
-			rtems_semaphore_release (ttyMutex);
+			rtems_semaphore_release (rtems_termios_ttyMutex);
 			return RTEMS_NO_MEMORY;
 		}
-		tty->forw = ttyHead;
-		ttyHead = tty;
-		if (ttyTail == NULL)
-			ttyTail = tty;
+		tty->forw = rtems_termios_ttyHead;
+		rtems_termios_ttyHead = tty;
+		if (rtems_termios_ttyTail == NULL)
+			rtems_termios_ttyTail = tty;
 
 		tty->minor = minor;
@@ -318,5 +274,5 @@
 	if (!tty->refcount++ && tty->device.firstOpen)
 		(*tty->device.firstOpen)(major, minor, arg);
-	rtems_semaphore_release (ttyMutex);
+	rtems_semaphore_release (rtems_termios_ttyMutex);
 	return RTEMS_SUCCESSFUL;
 }
@@ -354,5 +310,5 @@
 	rtems_status_code sc;
 
-	sc = rtems_semaphore_obtain (ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+	sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
 	if (sc != RTEMS_SUCCESSFUL)
 		rtems_fatal_error_occurred (sc);
@@ -362,9 +318,9 @@
 			 (*tty->device.lastClose)(tty->major, tty->minor, arg);
 		if (tty->forw == NULL)
-			ttyTail = tty->back;
+			rtems_termios_ttyTail = tty->back;
 		else
 			tty->forw->back = tty->back;
 		if (tty->back == NULL)
-			ttyHead = tty->forw;
+			rtems_termios_ttyHead = tty->forw;
 		else
 			tty->back->forw = tty->forw;
@@ -376,5 +332,5 @@
 		free (tty);
 	}
-	rtems_semaphore_release (ttyMutex);
+	rtems_semaphore_release (rtems_termios_ttyMutex);
 	return RTEMS_SUCCESSFUL;
 }
Index: c/src/lib/libc/termiosinitialize.c
===================================================================
--- c/src/lib/libc/termiosinitialize.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
+++ c/src/lib/libc/termiosinitialize.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -0,0 +1,50 @@
+/*
+ *  Termios initialization routine
+ *
+ *  Author:
+ *    W. Eric Norum
+ *    Saskatchewan Accelerator Laboratory
+ *    University of Saskatchewan
+ *    Saskatoon, Saskatchewan, CANADA
+ *    eric@skatter.usask.ca
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#include <rtems.h>
+#include <rtems.h>
+#include <rtems/libio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <unistd.h>
+
+struct rtems_termios_tty *rtems_termios_ttyHead;
+struct rtems_termios_tty *rtems_termios_ttyTail;
+rtems_id rtems_termios_ttyMutex;
+
+void
+rtems_termios_initialize (void)
+{
+  rtems_status_code sc;
+
+  /*
+   * Create the mutex semaphore for the tty list
+   */
+  if (!rtems_termios_ttyMutex) {
+    sc = rtems_semaphore_create (
+      rtems_build_name ('T', 'R', 'm', 'i'),
+      1,
+      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
+      RTEMS_NO_PRIORITY,
+      &rtems_termios_ttyMutex);
+    if (sc != RTEMS_SUCCESSFUL)
+      rtems_fatal_error_occurred (sc);
+  }
+}
Index: c/src/lib/libc/termiosreserveresources.c
===================================================================
--- c/src/lib/libc/termiosreserveresources.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
+++ c/src/lib/libc/termiosreserveresources.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -0,0 +1,28 @@
+/*
+ *  Reserve enough resources to open every physical device once.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+
+static int first_time;   /* assumed to be zeroed by BSS initialization */
+
+void rtems_termios_reserve_resources (
+  rtems_configuration_table *configuration,
+  rtems_unsigned32           number_of_devices
+)
+{
+        rtems_api_configuration_table *rtems_config;
+
+        if (!configuration)
+                rtems_fatal_error_occurred (0xFFF0F001);
+        rtems_config = configuration->RTEMS_api_configuration;
+        if (!rtems_config)
+                rtems_fatal_error_occurred (0xFFF0F002);
+        if (!first_time)
+                rtems_config->maximum_semaphores += 1;
+        first_time = 1;
+        rtems_config->maximum_semaphores += (4 * number_of_devices);
+}
+
Index: cpukit/libcsupport/src/termios.c
===================================================================
--- cpukit/libcsupport/src/termios.c	(revision 1d1b1507a6cc49166ab60b2e0963aa5f077bb1b0)
+++ cpukit/libcsupport/src/termios.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -142,52 +142,8 @@
 #define FL_MDXOF   0x400    /* output controlled with XON/XOFF protocol   */
 
-static struct rtems_termios_tty *ttyHead, *ttyTail;
-static rtems_id ttyMutex;
-
-/*
- *  Reserve enough resources to open every physical device once.
- */
-
-static int first_time;   /* assumed to be zeroed by BSS initialization */
-
-void
-rtems_termios_reserve_resources (
-  rtems_configuration_table *configuration,
-  rtems_unsigned32           number_of_devices
-  )
-{
-	rtems_api_configuration_table *rtems_config;
-
-	if (!configuration)
-		rtems_fatal_error_occurred (0xFFF0F001);
-	rtems_config = configuration->RTEMS_api_configuration;
-	if (!rtems_config)
-		rtems_fatal_error_occurred (0xFFF0F002);
-	if (!first_time)
-		rtems_config->maximum_semaphores += 1;
-	first_time = 1;
-	rtems_config->maximum_semaphores += (4 * number_of_devices);
-}
-
-void
-rtems_termios_initialize (void)
-{
-	rtems_status_code sc;
-
-	/*
-	 * Create the mutex semaphore for the tty list
-	 */
-	if (!ttyMutex) {
-		sc = rtems_semaphore_create (
-			rtems_build_name ('T', 'R', 'm', 'i'),
-			1,
-			RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-			RTEMS_NO_PRIORITY,
-			&ttyMutex);
-		if (sc != RTEMS_SUCCESSFUL)
-			rtems_fatal_error_occurred (sc);
-	}
-}
-	
+extern struct rtems_termios_tty *rtems_termios_ttyHead;
+extern struct rtems_termios_tty *rtems_termios_ttyTail;
+extern rtems_id rtems_termios_ttyMutex;
+
 /*
  * Open a termios device
@@ -208,8 +164,8 @@
 	 * See if the device has already been opened
 	 */
-	sc = rtems_semaphore_obtain (ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+	sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
 	if (sc != RTEMS_SUCCESSFUL)
 		return sc;
-	for (tty = ttyHead ; tty != NULL ; tty = tty->forw) {
+	for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
 		if ((tty->major == major) && (tty->minor == minor))
 			break;
@@ -223,11 +179,11 @@
 		tty = calloc (1, sizeof (struct rtems_termios_tty));
 		if (tty == NULL) {
-			rtems_semaphore_release (ttyMutex);
+			rtems_semaphore_release (rtems_termios_ttyMutex);
 			return RTEMS_NO_MEMORY;
 		}
-		tty->forw = ttyHead;
-		ttyHead = tty;
-		if (ttyTail == NULL)
-			ttyTail = tty;
+		tty->forw = rtems_termios_ttyHead;
+		rtems_termios_ttyHead = tty;
+		if (rtems_termios_ttyTail == NULL)
+			rtems_termios_ttyTail = tty;
 
 		tty->minor = minor;
@@ -318,5 +274,5 @@
 	if (!tty->refcount++ && tty->device.firstOpen)
 		(*tty->device.firstOpen)(major, minor, arg);
-	rtems_semaphore_release (ttyMutex);
+	rtems_semaphore_release (rtems_termios_ttyMutex);
 	return RTEMS_SUCCESSFUL;
 }
@@ -354,5 +310,5 @@
 	rtems_status_code sc;
 
-	sc = rtems_semaphore_obtain (ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+	sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
 	if (sc != RTEMS_SUCCESSFUL)
 		rtems_fatal_error_occurred (sc);
@@ -362,9 +318,9 @@
 			 (*tty->device.lastClose)(tty->major, tty->minor, arg);
 		if (tty->forw == NULL)
-			ttyTail = tty->back;
+			rtems_termios_ttyTail = tty->back;
 		else
 			tty->forw->back = tty->back;
 		if (tty->back == NULL)
-			ttyHead = tty->forw;
+			rtems_termios_ttyHead = tty->forw;
 		else
 			tty->back->forw = tty->forw;
@@ -376,5 +332,5 @@
 		free (tty);
 	}
-	rtems_semaphore_release (ttyMutex);
+	rtems_semaphore_release (rtems_termios_ttyMutex);
 	return RTEMS_SUCCESSFUL;
 }
Index: cpukit/libcsupport/src/termiosinitialize.c
===================================================================
--- cpukit/libcsupport/src/termiosinitialize.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
+++ cpukit/libcsupport/src/termiosinitialize.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -0,0 +1,50 @@
+/*
+ *  Termios initialization routine
+ *
+ *  Author:
+ *    W. Eric Norum
+ *    Saskatchewan Accelerator Laboratory
+ *    University of Saskatchewan
+ *    Saskatoon, Saskatchewan, CANADA
+ *    eric@skatter.usask.ca
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#include <rtems.h>
+#include <rtems.h>
+#include <rtems/libio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <unistd.h>
+
+struct rtems_termios_tty *rtems_termios_ttyHead;
+struct rtems_termios_tty *rtems_termios_ttyTail;
+rtems_id rtems_termios_ttyMutex;
+
+void
+rtems_termios_initialize (void)
+{
+  rtems_status_code sc;
+
+  /*
+   * Create the mutex semaphore for the tty list
+   */
+  if (!rtems_termios_ttyMutex) {
+    sc = rtems_semaphore_create (
+      rtems_build_name ('T', 'R', 'm', 'i'),
+      1,
+      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
+      RTEMS_NO_PRIORITY,
+      &rtems_termios_ttyMutex);
+    if (sc != RTEMS_SUCCESSFUL)
+      rtems_fatal_error_occurred (sc);
+  }
+}
Index: cpukit/libcsupport/src/termiosreserveresources.c
===================================================================
--- cpukit/libcsupport/src/termiosreserveresources.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
+++ cpukit/libcsupport/src/termiosreserveresources.c	(revision 5adf355aa3cf66dc768d502b5a4855d734ce9d49)
@@ -0,0 +1,28 @@
+/*
+ *  Reserve enough resources to open every physical device once.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+
+static int first_time;   /* assumed to be zeroed by BSS initialization */
+
+void rtems_termios_reserve_resources (
+  rtems_configuration_table *configuration,
+  rtems_unsigned32           number_of_devices
+)
+{
+        rtems_api_configuration_table *rtems_config;
+
+        if (!configuration)
+                rtems_fatal_error_occurred (0xFFF0F001);
+        rtems_config = configuration->RTEMS_api_configuration;
+        if (!rtems_config)
+                rtems_fatal_error_occurred (0xFFF0F002);
+        if (!first_time)
+                rtems_config->maximum_semaphores += 1;
+        first_time = 1;
+        rtems_config->maximum_semaphores += (4 * number_of_devices);
+}
+
