<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-06-20)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-20 Joel Sherrill <joel.sherrill@oarcorp.com>

        * sapi/include/confdefs.h: Add parameters for FIFOs and pipes since
        they are distinct to the user.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2442&r2=text&tr2=1.2443&diff_format=h">M</a></td><td width='1%'>1.2443</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.142&r2=text&tr2=1.143&diff_format=h">M</a></td><td width='1%'>1.143</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2442 rtems/cpukit/ChangeLog:1.2443
--- rtems/cpukit/ChangeLog:1.2442       Sat Jun 19 18:39:55 2010
+++ rtems/cpukit/ChangeLog      Sun Jun 20 14:41:32 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-06-20    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * sapi/include/confdefs.h: Add parameters for FIFOs and pipes since
+       they are distinct to the user.
+
</font> 2010-06-19        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
        * sapi/include/confdefs.h: Add CONFIGURE_MAXIMUM_FIFOS to account for

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.142 rtems/cpukit/sapi/include/confdefs.h:1.143
--- rtems/cpukit/sapi/include/confdefs.h:1.142  Sat Jun 19 18:39:56 2010
+++ rtems/cpukit/sapi/include/confdefs.h        Sun Jun 20 14:41:33 2010
</font><font color='#997700'>@@ -288,11 +288,10 @@
</font> #endif
 
 /**
<font color='#880000'>- *  It should be called FIFOs not pipes
</font><font color='#000088'>+ *  Internall it is called FIFOs not pipes
</font>  */
 #if defined(CONFIGURE_PIPES_ENABLED)
   #define CONFIGURE_FIFOS_ENABLED
<font color='#880000'>-  #warning "Use CONFIGURE_FIFOS_ENABLED not CONFIGURE_PIPES_ENABLED"
</font> #endif
 
 /**
<font color='#997700'>@@ -313,11 +312,19 @@
</font>  *  This sets up the resources for the PIPES/FIFOs
  */
 #if defined(CONFIGURE_FIFOS_ENABLED)
<font color='#000088'>+  #if !defined(CONFIGURE_MAXIMUM_FIFOS) && !defined(CONFIGURE_MAXIMUM_PIPES)
+     #error "No FIFOs or PIPES configured"
+  #endif
</font>   #if !defined(CONFIGURE_MAXIMUM_FIFOS)
<font color='#880000'>-    #error "FIFOs enabled but no FIFOs configured."
</font><font color='#000088'>+    #define CONFIGURE_MAXIMUM_FIFOS 0
+  #endif
+  #if !defined(CONFIGURE_MAXIMUM_PIPES)
+    #define CONFIGURE_MAXIMUM_PIPES 0
</font>   #endif
<font color='#880000'>-  #define CONFIGURE_BARRIERS_FOR_FIFOS   (2 * CONFIGURE_MAXIMUM_FIFOS)
-  #define CONFIGURE_SEMAPHORES_FOR_FIFOS (1 + CONFIGURE_MAXIMUM_FIFOS)
</font><font color='#000088'>+  #define CONFIGURE_BARRIERS_FOR_FIFOS \
+    (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
+  #define CONFIGURE_SEMAPHORES_FOR_FIFOS \
+    (1 + (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
</font> #else
   #define CONFIGURE_BARRIERS_FOR_FIFOS   0
   #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-20 Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.am, configure.ac: New test for error cases in FIFO creation.
        * spfifo08/.cvsignore, spfifo08/Makefile.am, spfifo08/init.c,
        spfifo08/spfifo08.doc, spfifo08/spfifo08.scn: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.374&r2=text&tr2=1.375&diff_format=h">M</a></td><td width='1%'>1.375</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/Makefile.am.diff?r1=text&tr1=1.86&r2=text&tr2=1.87&diff_format=h">M</a></td><td width='1%'>1.87</td><td width='100%'>testsuites/sptests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/configure.ac.diff?r1=text&tr1=1.91&r2=text&tr2=1.92&diff_format=h">M</a></td><td width='1%'>1.92</td><td width='100%'>testsuites/sptests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spfifo08/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spfifo08/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spfifo08/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/spfifo08.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spfifo08/spfifo08.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spfifo08/spfifo08.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/sptests/spfifo08/spfifo08.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.374 rtems/testsuites/sptests/ChangeLog:1.375
--- rtems/testsuites/sptests/ChangeLog:1.374    Sat Jun 19 15:55:03 2010
+++ rtems/testsuites/sptests/ChangeLog  Sun Jun 20 14:48:02 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-20    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * Makefile.am, configure.ac: New test for error cases in FIFO creation.
+       * spfifo08/.cvsignore, spfifo08/Makefile.am, spfifo08/init.c,
+       spfifo08/spfifo08.doc, spfifo08/spfifo08.scn: New files.
+
</font> 2010-06-19        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * sp09/screen01.c, sp09/sp09.scn, sp43/init.c, sp43/sp43.scn,

<font color='#006600'>diff -u rtems/testsuites/sptests/Makefile.am:1.86 rtems/testsuites/sptests/Makefile.am:1.87
--- rtems/testsuites/sptests/Makefile.am:1.86   Sat Jun 19 11:01:27 2010
+++ rtems/testsuites/sptests/Makefile.am        Sun Jun 20 14:48:02 2010
</font><font color='#997700'>@@ -19,7 +19,7 @@
</font>     spstkalloc spthreadq01 spwatchdog spwkspace \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
     spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 \
<font color='#880000'>-    spfifo01 spfifo02 spfifo03 spfifo04 \
</font><font color='#000088'>+    spfifo01 spfifo02 spfifo03 spfifo04 spfifo08 \
</font>     spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
     spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
     spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \

<font color='#006600'>diff -u rtems/testsuites/sptests/configure.ac:1.91 rtems/testsuites/sptests/configure.ac:1.92
--- rtems/testsuites/sptests/configure.ac:1.91  Sat Jun 19 11:01:27 2010
+++ rtems/testsuites/sptests/configure.ac       Sun Jun 20 14:48:03 2010
</font><font color='#997700'>@@ -116,6 +116,7 @@
</font> spfifo02/Makefile
 spfifo03/Makefile
 spfifo04/Makefile
<font color='#000088'>+spfifo08/Makefile
</font> spintrcritical01/Makefile
 spintrcritical02/Makefile
 spintrcritical03/Makefile

<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfifo08/.cvsignore:1.1
--- /dev/null   Sun Jun 20 15:11:56 2010
+++ rtems/testsuites/sptests/spfifo08/.cvsignore        Sun Jun 20 14:48:03 2010
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfifo08/Makefile.am:1.1
--- /dev/null   Sun Jun 20 15:11:56 2010
+++ rtems/testsuites/sptests/spfifo08/Makefile.am       Sun Jun 20 14:48:03 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfifo08
+spfifo08_SOURCES = init.c ../../support/src/spin.c
+
+dist_rtems_tests_DATA = spfifo08.scn
+dist_rtems_tests_DATA += spfifo08.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spfifo08_OBJECTS) $(spfifo08_LDADD)
+LINK_LIBS = $(spfifo08_LDLIBS)
+
+spfifo08$(EXEEXT): $(spfifo08_OBJECTS) $(spfifo08_DEPENDENCIES)
+       @rm -f spfifo08$(EXEEXT)
+       $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfifo08/init.c:1.1
--- /dev/null   Sun Jun 20 15:11:56 2010
+++ rtems/testsuites/sptests/spfifo08/init.c    Sun Jun 20 14:48:03 2010
</font><font color='#997700'>@@ -0,0 +1,165 @@
</font><font color='#000088'>+/*
+ *  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.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#define MAXIMUM 10
+rtems_id Barriers[MAXIMUM];
+int BarrierCount;
+
+rtems_id Semaphores[MAXIMUM];
+int SemaphoreCount;
+
+void create_all_barriers(void)
+{
+  rtems_status_code status;
+  int               i;
+
+  BarrierCount = 0;
+
+  for ( i=0 ; i<MAXIMUM ; i++ ) {
+    status = rtems_barrier_create(
+      rtems_build_name( 'B', 'A', 'R', 0x30+i ),
+      RTEMS_BARRIER_MANUAL_RELEASE,
+      0,
+      &Barriers[i]
+    );
+    if ( status == RTEMS_TOO_MANY ) {
+      printf( "%d Barriers created\n", BarrierCount );
+      return;
+    }<span style="background-color: #FF0000"> </span>
+
+    directive_failed( status, "barrier create" );
+    BarrierCount++;
+  }
+}
+
+void create_all_semaphores(void)
+{
+  rtems_status_code status;
+  int               i;
+
+  SemaphoreCount = 0;
+
+  for ( i=0 ; i<MAXIMUM ; i++ ) {
+    status = rtems_semaphore_create(
+      rtems_build_name( 'S', 'E', 'M', 0x30+i ),
+      0,
+      RTEMS_DEFAULT_ATTRIBUTES,
+      0,
+      &Semaphores[i]
+    );
+    if ( status == RTEMS_TOO_MANY ) {
+      printf( "%d Semaphores created\n", SemaphoreCount );
+      return;
+    }<span style="background-color: #FF0000"> </span>
+
+    directive_failed( status, "semaphore create" );
+    SemaphoreCount++;
+  }
+}
+
+void delete_barrier(void)
+{
+  rtems_status_code status;
+<span style="background-color: #FF0000">  </span>
+  puts( "Deleting a barrier" );
+  status = rtems_barrier_delete( Barriers[BarrierCount] );
+  directive_failed( status, "barrier delete" );
+}
+
+void delete_semaphore(void)
+{
+  rtems_status_code status;
+<span style="background-color: #FF0000">  </span>
+  puts( "Deleting a semaphore" );
+  status = rtems_semaphore_delete( Semaphores[SemaphoreCount] );
+  directive_failed( status, "semaphore delete" );
+}
+
+void create_fifo(void)
+{
+  int status;
+
+  status = mkfifo("/fifo01", 0777);
+  rtems_test_assert(status == 0);
+}
+
+void open_fifo(int expected)
+{
+  int fd;
+
+  fd = open("/fifo01", O_RDONLY);
+  printf( "status=%d errno=%d/(%s)\n", fd, errno, strerror(errno) );
+  if ( expected ) {
+    rtems_test_assert(fd == -1);
+    rtems_test_assert(errno == expected);
+  } else {
+    rtems_test_assert(fd != -1);
+    close( fd );
+  }
+}
+
+rtems_task Init(
+  rtems_task_argument argument
+)
+{
+  puts( "\n\n*** TEST FIFO 08 ***" );
+
+  puts( "Creating all barriers" );
+  create_all_barriers();
+
+  puts( "Creating all semaphores" );
+  create_all_semaphores();
+
+  puts( "Creating FIFO" );
+  create_fifo();
+<span style="background-color: #FF0000">  </span>
+  puts( "Opening FIFO.. expect ENOMEM (barrier - case 1)" );
+  open_fifo(ENOMEM);
+
+  delete_barrier();
+  puts( "Opening FIFO.. expect ENOMEM (barrier - case 2)" );
+  open_fifo(ENOMEM);
+
+  delete_barrier();
+  puts( "Opening FIFO.. expect ENOMEM (semaphore - case 1)" );
+
+  open_fifo(0);
+<span style="background-color: #FF0000">  </span>
+  puts( "*** END OF TEST FIFO 08 ***" );
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS             1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
+#define CONFIGURE_FIFOS_ENABLED
+#define CONFIGURE_MAXIMUM_FIFOS 1
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfifo08/spfifo08.doc:1.1
--- /dev/null   Sun Jun 20 15:11:56 2010
+++ rtems/testsuites/sptests/spfifo08/spfifo08.doc      Sun Jun 20 14:48:03 2010
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+#
+#  $Id$
+#
+#  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.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spfifo08
+
+directives:
+
+   mkfifo()
+   open() - on FIFOs
+
+concepts:
+
++ memory allocation error cases<span style="background-color: #FF0000"> </span>
++ resource allocation error cases<span style="background-color: #FF0000"> </span>
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spfifo08/spfifo08.scn:1.1
--- /dev/null   Sun Jun 20 15:11:56 2010
+++ rtems/testsuites/sptests/spfifo08/spfifo08.scn      Sun Jun 20 14:48:03 2010
</font><font color='#997700'>@@ -0,0 +1 @@
</font><font color='#000088'>+XXX fill in with test output
</font></pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>