[PATCH 3/6] termios: Use C11 mutex for input/output

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Dec 14 13:39:39 UTC 2016


Use C11 mutexes instead of Classic semaphores as a performance
optimization and to simplify the application configuration.

A performance of Classic semaphores vs. C11 mutexes was measured on the
arm/atsam BSP. A NXP SC16IS752 was connected via SPI. The RTEMS
application used one task to read from the device and write it
immediately back (look back via task). A development system constantly
transmitted data at 115200 bits per second.

CPU usage by function with Classic semaphores:

name______________________________________|ratio___
CPU_Thread_Idle_body                      | 22.454%
atsam_spi_setup_transfer                  |  6.767%
Objects_Get                               |  5.859%
atsam_spi_interrupt                       |  4.483%
Event_Seize                               |  3.867%
rtems_termios_enqueue_raw_characters      |  3.804%
Timecounter_Binuptime                     |  3.715%
Scheduler_priority_Block                  |  3.104%
rtems_semaphore_release                   |  3.018%
Scheduler_priority_Unblock                |  2.901%
rtems_termios_read_tty                    |  2.777%
ARMV7M_NVIC_Interrupt_dispatch            |  2.750%
rtems_semaphore_obtain                    |  2.627%
Thread_Do_dispatch                        |  2.351%
ARMV7M_Interrupt_service_leave            |  2.086%
iproc                                     |  1.919%

CPU usage by function with C11 mutexes:

name______________________________________|ratio___
CPU_Thread_Idle_body                      | 33.395%
atsam_spi_setup_transfer                  |  6.061%
atsam_spi_interrupt                       |  4.690%
Mutex_recursive_Release                   |  3.011%
Event_Seize                               |  2.955%
ARMV7M_NVIC_Interrupt_dispatch            |  2.885%
rtems_termios_enqueue_raw_characters      |  2.771%
rtems_termios_read_tty                    |  2.722%
Timecounter_Binuptime                     |  2.653%
Thread_Do_dispatch                        |  2.240%
Scheduler_priority_Block                  |  2.112%
ARMV7M_Interrupt_service_leave            |  2.100%
Scheduler_priority_Unblock                |  1.919%
Mutex_recursive_Acquire                   |  1.876%
iproc                                     |  1.773%

The change resulted in 10% more total idle time on the system.

Update #2840.
---
 cpukit/libcsupport/include/rtems/termiostypes.h |   7 +-
 cpukit/libcsupport/src/termios.c                | 159 ++++++++++++------------
 cpukit/sapi/include/confdefs.h                  |   2 +-
 testsuites/sptests/Makefile.am                  |   2 +-
 testsuites/sptests/configure.ac                 |   2 -
 testsuites/sptests/spfatal18/Makefile.am        |  24 ----
 testsuites/sptests/spfatal18/spfatal18.doc      |  19 ---
 testsuites/sptests/spfatal18/spfatal18.scn      |   3 -
 testsuites/sptests/spfatal18/testcase.h         |  25 ----
 testsuites/sptests/spfatal19/Makefile.am        |  24 ----
 testsuites/sptests/spfatal19/spfatal19.doc      |  19 ---
 testsuites/sptests/spfatal19/spfatal19.scn      |   3 -
 testsuites/sptests/spfatal19/testcase.h         |  25 ----
 13 files changed, 85 insertions(+), 229 deletions(-)
 delete mode 100644 testsuites/sptests/spfatal18/Makefile.am
 delete mode 100644 testsuites/sptests/spfatal18/spfatal18.doc
 delete mode 100644 testsuites/sptests/spfatal18/spfatal18.scn
 delete mode 100644 testsuites/sptests/spfatal18/testcase.h
 delete mode 100644 testsuites/sptests/spfatal19/Makefile.am
 delete mode 100644 testsuites/sptests/spfatal19/spfatal19.doc
 delete mode 100644 testsuites/sptests/spfatal19/spfatal19.scn
 delete mode 100644 testsuites/sptests/spfatal19/testcase.h

diff --git a/cpukit/libcsupport/include/rtems/termiostypes.h b/cpukit/libcsupport/include/rtems/termiostypes.h
index ffe172c..0a9da78 100644
--- a/cpukit/libcsupport/include/rtems/termiostypes.h
+++ b/cpukit/libcsupport/include/rtems/termiostypes.h
@@ -22,6 +22,7 @@
 #include <rtems/chain.h>
 #include <stdint.h>
 #include <termios.h>
+#include <threads.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -76,7 +77,7 @@ typedef struct rtems_termios_device_context {
     rtems_interrupt_lock interrupt;
 
     /* Used for TERMIOS_IRQ_SERVER_DRIVEN or TERMIOS_TASK_DRIVEN */
-    rtems_id mutex;
+    mtx_t mutex;
   } lock;
 
   void ( *lock_acquire )(
@@ -283,8 +284,8 @@ typedef struct rtems_termios_tty {
   /*
    * Mutual-exclusion semaphores
    */
-  rtems_id  isem;
-  rtems_id  osem;
+  mtx_t imtx;
+  mtx_t omtx;
 
   /*
    * The canonical (cooked) character buffer
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index d3757df..6ff6043 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -112,6 +112,50 @@ 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 void
+lock (mtx_t *mtx)
+{
+  int error;
+
+  error = mtx_lock (mtx);
+  _Assert (error == thrd_success);
+  (void)error;
+}
+
+static void
+unlock (mtx_t *mtx)
+{
+  int error;
+
+  error = mtx_unlock (mtx);
+  _Assert (error == thrd_success);
+  (void)error;
+}
+
+static void
+outputLock (rtems_termios_tty *tty)
+{
+  lock (&tty->omtx);
+}
+
+static void
+outputUnlock (rtems_termios_tty *tty)
+{
+  unlock (&tty->omtx);
+}
+
+static void
+inputLock (rtems_termios_tty *tty)
+{
+  lock (&tty->imtx);
+}
+
+static void
+inputUnlock (rtems_termios_tty *tty)
+{
+  unlock (&tty->imtx);
+}
+
 static rtems_status_code
 rtems_termios_obtain (void)
 {
@@ -282,8 +326,6 @@ needDeviceMutex (rtems_termios_tty *tty)
 static void
 rtems_termios_destroy_tty (rtems_termios_tty *tty, void *arg, bool last_close)
 {
-  rtems_status_code sc;
-
   if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
     /*
      * call discipline-specific close
@@ -293,15 +335,14 @@ rtems_termios_destroy_tty (rtems_termios_tty *tty, void *arg, bool last_close)
     /*
      * default: just flush output buffer
      */
-    sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-    if (sc != RTEMS_SUCCESSFUL) {
-      rtems_fatal_error_occurred (sc);
-    }
+    outputLock (tty);
     drainOutput (tty);
-    rtems_semaphore_release (tty->osem);
+    outputUnlock (tty);
   }
 
   if (tty->handler.mode == TERMIOS_TASK_DRIVEN) {
+    rtems_status_code sc;
+
     /*
      * send "terminate" to I/O tasks
      */
@@ -318,15 +359,15 @@ rtems_termios_destroy_tty (rtems_termios_tty *tty, void *arg, bool last_close)
   if (tty->device_node != NULL)
     tty->device_node->tty = NULL;
 
-  rtems_semaphore_delete (tty->isem);
-  rtems_semaphore_delete (tty->osem);
+  mtx_destroy (&tty->imtx);
+  mtx_destroy (&tty->omtx);
   rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
   if ((tty->handler.poll_read == NULL) ||
       (tty->handler.mode == TERMIOS_TASK_DRIVEN))
     rtems_semaphore_delete (tty->rawInBuf.Semaphore);
 
   if (needDeviceMutex (tty)) {
-    rtems_semaphore_delete (tty->device_context->lock.mutex);
+    mtx_destroy (&tty->device_context->lock.mutex);
   } else if (tty->device_context == &tty->legacy_device_context) {
     rtems_interrupt_lock_destroy (&tty->legacy_device_context.lock.interrupt);
   }
@@ -343,11 +384,7 @@ deviceAcquireMutex(
   rtems_interrupt_lock_context *lock_context
 )
 {
-  rtems_status_code sc;
-
-  sc = rtems_semaphore_obtain (ctx->lock.mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  _Assert (sc == RTEMS_SUCCESSFUL);
-  (void) sc;
+  lock (&ctx->lock.mutex);
 }
 
 static void
@@ -356,11 +393,7 @@ deviceReleaseMutex(
   rtems_interrupt_lock_context *lock_context
 )
 {
-  rtems_status_code sc;
-
-  sc = rtems_semaphore_release (ctx->lock.mutex);
-  _Assert (sc == RTEMS_SUCCESSFUL);
-  (void) sc;
+  unlock (&ctx->lock.mutex);
 }
 
 static void
@@ -448,22 +481,8 @@ rtems_termios_open_tty(
     /*
      * Set up mutex semaphores
      */
-    sc = rtems_semaphore_create (
-      rtems_build_name ('T', 'R', 'i', c),
-      1,
-      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-      RTEMS_NO_PRIORITY,
-      &tty->isem);
-    if (sc != RTEMS_SUCCESSFUL)
-      rtems_fatal_error_occurred (sc);
-    sc = rtems_semaphore_create (
-      rtems_build_name ('T', 'R', 'o', c),
-      1,
-      RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-      RTEMS_NO_PRIORITY,
-      &tty->osem);
-    if (sc != RTEMS_SUCCESSFUL)
-      rtems_fatal_error_occurred (sc);
+    mtx_init (&tty->imtx, mtx_plain);
+    mtx_init (&tty->omtx, mtx_plain);
     sc = rtems_semaphore_create (
       rtems_build_name ('T', 'R', 'x', c),
       0,
@@ -517,16 +536,7 @@ rtems_termios_open_tty(
     ctx = tty->device_context;
 
     if (needDeviceMutex (tty)) {
-      sc = rtems_semaphore_create (
-        rtems_build_name ('T', 'l', 'k', c),
-        1,
-        RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-        0,
-        &ctx->lock.mutex);
-      if (sc != RTEMS_SUCCESSFUL) {
-        rtems_fatal_error_occurred (sc);
-      }
-
+      mtx_init (&ctx->lock.mutex, mtx_plain);
       ctx->lock_acquire = deviceAcquireMutex;
       ctx->lock_release = deviceReleaseMutex;
     } else {
@@ -847,11 +857,9 @@ rtems_termios_ioctl (void *arg)
   struct ttywakeup         *wakeup = (struct ttywakeup *)args->buffer;
   rtems_status_code sc;
 
+  sc = RTEMS_SUCCESSFUL;
   args->ioctl_return = 0;
-  sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  if (sc != RTEMS_SUCCESSFUL) {
-    return sc;
-  }
+  outputLock (tty);
   switch (args->command) {
   default:
     if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
@@ -970,7 +978,7 @@ rtems_termios_ioctl (void *arg)
     break;
   }
 
-  rtems_semaphore_release (tty->osem);
+  outputUnlock (tty);
   return sc;
 }
 
@@ -1173,19 +1181,18 @@ rtems_termios_write (void *arg)
 {
   rtems_libio_rw_args_t *args = arg;
   struct rtems_termios_tty *tty = args->iop->data1;
-  rtems_status_code sc;
 
-  sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  if (sc != RTEMS_SUCCESSFUL)
-    return sc;
+  outputLock (tty);
   if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
+    rtems_status_code sc;
+
     sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
-    rtems_semaphore_release (tty->osem);
+    outputUnlock (tty);
     return sc;
   }
   args->bytes_moved = rtems_termios_write_tty (tty, args->buffer, args->count);
-  rtems_semaphore_release (tty->osem);
-  return sc;
+  outputUnlock (tty);
+  return RTEMS_SUCCESSFUL;
 }
 
 /*
@@ -1351,14 +1358,9 @@ siproc (unsigned char c, struct rtems_termios_tty *tty)
    * Obtain output semaphore if character will be echoed
    */
   if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
-    rtems_status_code sc;
-    sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-    if (sc != RTEMS_SUCCESSFUL)
-      rtems_fatal_error_occurred (sc);
+    outputLock (tty);
     i = iproc (c, tty);
-    sc = rtems_semaphore_release (tty->osem);
-    if (sc != RTEMS_SUCCESSFUL)
-      rtems_fatal_error_occurred (sc);
+    outputUnlock (tty);
   }
   else {
     i = iproc (c, tty);
@@ -1521,22 +1523,21 @@ rtems_termios_read (void *arg)
 {
   rtems_libio_rw_args_t *args = arg;
   struct rtems_termios_tty *tty = args->iop->data1;
-  rtems_status_code sc;
 
-  sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  if (sc != RTEMS_SUCCESSFUL)
-    return sc;
+  inputLock (tty);
 
   if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
+    rtems_status_code sc;
+
     sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
     tty->tty_rcvwakeup = 0;
-    rtems_semaphore_release (tty->isem);
+    inputUnlock (tty);
     return sc;
   }
 
   args->bytes_moved = rtems_termios_read_tty (tty, args->buffer, args->count);
-  rtems_semaphore_release (tty->isem);
-  return sc;
+  inputUnlock (tty);
+  return RTEMS_SUCCESSFUL;
 }
 
 /*
@@ -1968,8 +1969,7 @@ rtems_termios_imfs_read (rtems_libio_t *iop, void *buffer, size_t count)
 
   tty = iop->data1;
 
-  sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  _Assert (sc == RTEMS_SUCCESSFUL);
+  inputLock (tty);
 
   if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
     rtems_libio_rw_args_t args;
@@ -1982,7 +1982,7 @@ rtems_termios_imfs_read (rtems_libio_t *iop, void *buffer, size_t count)
 
     sc = rtems_termios_linesw[tty->t_line].l_read (tty, &args);
     tty->tty_rcvwakeup = 0;
-    rtems_semaphore_release (tty->isem);
+    inputUnlock (tty);
 
     if (sc != RTEMS_SUCCESSFUL) {
       return rtems_status_code_to_errno (sc);
@@ -1992,7 +1992,7 @@ rtems_termios_imfs_read (rtems_libio_t *iop, void *buffer, size_t count)
   }
 
   bytes_moved = rtems_termios_read_tty (tty, buffer, count);
-  rtems_semaphore_release (tty->isem);
+  inputUnlock (tty);
   return (ssize_t) bytes_moved;
 }
 
@@ -2005,8 +2005,7 @@ rtems_termios_imfs_write (rtems_libio_t *iop, const void *buffer, size_t count)
 
   tty = iop->data1;
 
-  sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  _Assert (sc == RTEMS_SUCCESSFUL);
+  outputLock (tty);
 
   if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
     rtems_libio_rw_args_t args;
@@ -2018,7 +2017,7 @@ rtems_termios_imfs_write (rtems_libio_t *iop, const void *buffer, size_t count)
     args.flags = iop->flags;
 
     sc = rtems_termios_linesw[tty->t_line].l_write (tty, &args);
-    rtems_semaphore_release (tty->osem);
+    outputUnlock (tty);
 
     if (sc != RTEMS_SUCCESSFUL) {
       return rtems_status_code_to_errno (sc);
@@ -2028,7 +2027,7 @@ rtems_termios_imfs_write (rtems_libio_t *iop, const void *buffer, size_t count)
   }
 
   bytes_moved = rtems_termios_write_tty (tty, buffer, count);
-  rtems_semaphore_release (tty->osem);
+  outputUnlock (tty);
   return (ssize_t) bytes_moved;
 }
 
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 3a718ba..aa5fc08 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -185,7 +185,7 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
    * based upon the number of communication ports that will use it.
    */
   #define CONFIGURE_TERMIOS_SEMAPHORES \
-    ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
+    ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 2) + 1)
 #endif
 
 /**
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 54a4de7..5b48fc6 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -17,7 +17,7 @@ _SUBDIRS = \
     sperror01 sperror02 sperror03 \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
     spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
-    spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 spfatal20 \
+    spfatal15 spfatal16 spfatal17 spfatal20 \
     spfatal24 spfatal25 spfatal27\
     spfifo01 spfifo02 spfifo03 spfifo04 spfifo05 \
     spfreechain01 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 76d60e3..c844951 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -187,8 +187,6 @@ spfatal14/Makefile
 spfatal15/Makefile
 spfatal16/Makefile
 spfatal17/Makefile
-spfatal18/Makefile
-spfatal19/Makefile
 spfatal20/Makefile
 spfatal24/Makefile
 spfatal25/Makefile
diff --git a/testsuites/sptests/spfatal18/Makefile.am b/testsuites/sptests/spfatal18/Makefile.am
deleted file mode 100644
index 8e7e83a..0000000
--- a/testsuites/sptests/spfatal18/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-rtems_tests_PROGRAMS = spfatal18
-spfatal18_SOURCES = ../spfatal_support/init.c \
-    ../spfatal_support/consume_sems.c \
-    ../spfatal_support/system.h testcase.h
-
-dist_rtems_tests_DATA = spfatal18.scn
-dist_rtems_tests_DATA += spfatal18.doc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-AM_CPPFLAGS += -DSEMAPHORES_REMAINING=2
-
-LINK_OBJS = $(spfatal18_OBJECTS)
-LINK_LIBS = $(spfatal18_LDLIBS)
-
-spfatal18$(EXEEXT): $(spfatal18_OBJECTS) $(spfatal18_DEPENDENCIES)
-	@rm -f spfatal18$(EXEEXT)
-	$(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal18/spfatal18.doc b/testsuites/sptests/spfatal18/spfatal18.doc
deleted file mode 100644
index ffc0c51..0000000
--- a/testsuites/sptests/spfatal18/spfatal18.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-#  COPYRIGHT (c) 1989-2010.
-#  On-Line Applications Research Corporation (OAR).
-#
-#  The license and distribution terms for this file may be
-#  found in the file LICENSE in this distribution or at
-#  http://www.rtems.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name:  spfatal18
-
-directives:
-
-  rtems_termios_open
-
-concepts:
-
-+ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal18/spfatal18.scn b/testsuites/sptests/spfatal18/spfatal18.scn
deleted file mode 100644
index 8912a58..0000000
--- a/testsuites/sptests/spfatal18/spfatal18.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 18 ***
-Fatal error (termios sem create #3) hit
-*** END OF TEST FATAL 18 ***
diff --git a/testsuites/sptests/spfatal18/testcase.h b/testsuites/sptests/spfatal18/testcase.h
deleted file mode 100644
index eab617c..0000000
--- a/testsuites/sptests/spfatal18/testcase.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  COPYRIGHT (c) 1989-2010.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-/* generate fatal errors in termios.c 
- *    rtems_semaphore_create( rtems_build_name ('T', 'R', 'o', c),...);
- */
-
-#define FATAL_ERROR_TEST_NAME            "18"
-#define FATAL_ERROR_DESCRIPTION          "termios sem create #3"
-#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR       RTEMS_TOO_MANY
-
-#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
-  CONSUME_SEMAPHORE_DRIVERS
-
-void force_error()
-{
-  /* we will not run this far */
-}
diff --git a/testsuites/sptests/spfatal19/Makefile.am b/testsuites/sptests/spfatal19/Makefile.am
deleted file mode 100644
index b688429..0000000
--- a/testsuites/sptests/spfatal19/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-
-rtems_tests_PROGRAMS = spfatal19
-spfatal19_SOURCES = ../spfatal_support/init.c \
-    ../spfatal_support/consume_sems.c \
-    ../spfatal_support/system.h testcase.h
-
-dist_rtems_tests_DATA = spfatal19.scn
-dist_rtems_tests_DATA += spfatal19.doc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-AM_CPPFLAGS += -DSEMAPHORES_REMAINING=1
-
-LINK_OBJS = $(spfatal19_OBJECTS)
-LINK_LIBS = $(spfatal19_LDLIBS)
-
-spfatal19$(EXEEXT): $(spfatal19_OBJECTS) $(spfatal19_DEPENDENCIES)
-	@rm -f spfatal19$(EXEEXT)
-	$(make-exe)
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spfatal19/spfatal19.doc b/testsuites/sptests/spfatal19/spfatal19.doc
deleted file mode 100644
index a0d5670..0000000
--- a/testsuites/sptests/spfatal19/spfatal19.doc
+++ /dev/null
@@ -1,19 +0,0 @@
-#  COPYRIGHT (c) 1989-2010.
-#  On-Line Applications Research Corporation (OAR).
-#
-#  The license and distribution terms for this file may be
-#  found in the file LICENSE in this distribution or at
-#  http://www.rtems.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name:  spfatal19
-
-directives:
-
-  rtems_termios_open
-
-concepts:
-
-+ fatal error for one of the semaphore creates
diff --git a/testsuites/sptests/spfatal19/spfatal19.scn b/testsuites/sptests/spfatal19/spfatal19.scn
deleted file mode 100644
index 6dd2901..0000000
--- a/testsuites/sptests/spfatal19/spfatal19.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 19 ***
-Fatal error (termios sem create #4) hit
-*** END OF TEST FATAL 19 ***
diff --git a/testsuites/sptests/spfatal19/testcase.h b/testsuites/sptests/spfatal19/testcase.h
deleted file mode 100644
index 16ef09d..0000000
--- a/testsuites/sptests/spfatal19/testcase.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  COPYRIGHT (c) 1989-2010.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-/* generate fatal errors in termios.c 
- *    rtems_semaphore_create( rtems_build_name ('T', 'R', 'i', c),...);
- */
-
-#define FATAL_ERROR_TEST_NAME            "19"
-#define FATAL_ERROR_DESCRIPTION          "termios sem create #4"
-#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR       RTEMS_TOO_MANY
-
-#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
-  CONSUME_SEMAPHORE_DRIVERS
-
-void force_error()
-{
-  /* we will not run this far */
-}
-- 
1.8.4.5



More information about the devel mailing list