change log for rtems (2010-06-08)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue Jun 8 11:11:22 UTC 2010


 *sh*:
2010-06-08	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* libfs/src/imfs/fifoimfs_init.c: New file.
	* libfs/Makefile.am: Reflect change above.
	* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c,
	libfs/src/imfs/imfs_init.c, libfs/src/imfs/imfs_initsupp.c,
	libfs/src/imfs/miniimfs_init.c, libfs/src/pipe/fifo.c,
	libfs/src/pipe/pipe.c, libfs/src/pipe/pipe.h: Pipe support is now
	link-time optional.
	* sapi/include/confdefs.h: Reflect changes above.

M 1.2354  cpukit/ChangeLog
M   1.41  cpukit/libfs/Makefile.am
A    1.1  cpukit/libfs/src/imfs/fifoimfs_init.c
M   1.43  cpukit/libfs/src/imfs/imfs.h
M   1.27  cpukit/libfs/src/imfs/imfs_eval.c
M   1.18  cpukit/libfs/src/imfs/imfs_init.c
M   1.22  cpukit/libfs/src/imfs/imfs_initsupp.c
M   1.15  cpukit/libfs/src/imfs/miniimfs_init.c
M    1.5  cpukit/libfs/src/pipe/fifo.c
M    1.4  cpukit/libfs/src/pipe/pipe.h
M    1.5  cpukit/libfs/src/pipe/pipe.c
M  1.137  cpukit/sapi/include/confdefs.h

diff -u rtems/cpukit/ChangeLog:1.2353 rtems/cpukit/ChangeLog:1.2354
--- rtems/cpukit/ChangeLog:1.2353	Tue Jun  8 03:50:57 2010
+++ rtems/cpukit/ChangeLog	Tue Jun  8 05:25:36 2010
@@ -1,5 +1,16 @@
 2010-06-08	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
+	* libfs/src/imfs/fifoimfs_init.c: New file.
+	* libfs/Makefile.am: Reflect change above.
+	* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c,
+	libfs/src/imfs/imfs_init.c, libfs/src/imfs/imfs_initsupp.c,
+	libfs/src/imfs/miniimfs_init.c, libfs/src/pipe/fifo.c,
+	libfs/src/pipe/pipe.c, libfs/src/pipe/pipe.h: Pipe support is now
+	link-time optional.
+	* sapi/include/confdefs.h: Reflect changes above.
+
+2010-06-08	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
 	* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_rmnod.c: Added and use
 	IMFS_create_orphan() and IMFS_check_node_remove().
 	* libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs_directory.c,

diff -u rtems/cpukit/libfs/Makefile.am:1.40 rtems/cpukit/libfs/Makefile.am:1.41
--- rtems/cpukit/libfs/Makefile.am:1.40	Thu Mar  4 00:36:50 2010
+++ rtems/cpukit/libfs/Makefile.am	Tue Jun  8 05:25:45 2010
@@ -31,7 +31,7 @@
     src/imfs/imfs_debug.c src/imfs/imfs_rmnod.c src/imfs/imfs_symlink.c \
     src/imfs/imfs_readlink.c src/imfs/imfs_fdatasync.c src/imfs/imfs_fcntl.c \
     src/imfs/ioman.c src/imfs/miniimfs_init.c src/imfs/imfs_load_tar.c \
-    src/imfs/imfs_rename.c src/imfs/imfs.h \
+    src/imfs/imfs_rename.c src/imfs/fifoimfs_init.c src/imfs/imfs.h \
     src/imfs/deviceerrno.c \
     src/devfs/devfs_init.c src/devfs/devfs_eval.c src/devfs/devfs_mknod.c \
     src/devfs/devfs_show.c src/devfs/devfs_node_type.c \

diff -u /dev/null rtems/cpukit/libfs/src/imfs/fifoimfs_init.c:1.1
--- /dev/null	Tue Jun  8 06:11:20 2010
+++ rtems/cpukit/libfs/src/imfs/fifoimfs_init.c	Tue Jun  8 05:25:40 2010
@@ -0,0 +1,61 @@
+/**
+ * @file
+ *
+ * @ingroup LibFSIMFS
+ *
+ * @brief IMFS without fifo support initialization.
+ */
+
+/*
+ * Copyright (c) 2010
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * D-82178 Puchheim
+ * Germany
+ * <rtems at embedded-brains.de>
+ *
+ * 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "imfs.h"
+
+static const rtems_filesystem_operations_table fifoIMFS_ops = {
+  .evalpath_h = IMFS_eval_path,
+  .evalformake_h = IMFS_evaluate_for_make,
+  .link_h = IMFS_link,
+  .unlink_h = IMFS_unlink,
+  .node_type_h = IMFS_node_type,
+  .mknod_h = IMFS_mknod,
+  .chown_h = IMFS_chown,
+  .freenod_h = IMFS_freenodinfo,
+  .mount_h = IMFS_mount,
+  .fsmount_me_h = fifoIMFS_initialize,
+  .unmount_h = IMFS_unmount,
+  .fsunmount_me_h = IMFS_fsunmount,
+  .utime_h = IMFS_utime,
+  .eval_link_h = IMFS_evaluate_link,
+  .symlink_h = IMFS_symlink,
+  .readlink_h = IMFS_readlink,
+  .rename_h = IMFS_rename,
+  .statvfs_h = NULL
+};
+
+int fifoIMFS_initialize(
+  rtems_filesystem_mount_table_entry_t *mt_entry,
+  const void *data
+)
+{
+  return IMFS_initialize_support(
+    mt_entry,
+    &fifoIMFS_ops,
+    &IMFS_memfile_handlers,
+    &IMFS_directory_handlers,
+    &IMFS_fifo_handlers
+  );
+}

diff -u rtems/cpukit/libfs/src/imfs/imfs.h:1.42 rtems/cpukit/libfs/src/imfs/imfs.h:1.43
--- rtems/cpukit/libfs/src/imfs/imfs.h:1.42	Tue Jun  8 03:50:54 2010
+++ rtems/cpukit/libfs/src/imfs/imfs.h	Tue Jun  8 05:25:44 2010
@@ -223,6 +223,7 @@
   ino_t                                   ino_count;
   const rtems_filesystem_file_handlers_r *memfile_handlers;
   const rtems_filesystem_file_handlers_r *directory_handlers;
+  const rtems_filesystem_file_handlers_r *fifo_handlers;
 } IMFS_fs_info_t;
 
 /*
@@ -247,7 +248,6 @@
 extern const rtems_filesystem_file_handlers_r       IMFS_memfile_handlers;
 extern const rtems_filesystem_file_handlers_r       IMFS_fifo_handlers;
 extern const rtems_filesystem_operations_table      IMFS_ops;
-extern const rtems_filesystem_operations_table      miniIMFS_ops;
 extern const rtems_filesystem_limits_and_options_t  IMFS_LIMITS_AND_OPTIONS;
 
 /*
@@ -259,6 +259,11 @@
    const void                           *data
 );
 
+extern int fifoIMFS_initialize(
+  rtems_filesystem_mount_table_entry_t  *mt_entry,
+  const void                            *data
+);
+
 extern int miniIMFS_initialize(
    rtems_filesystem_mount_table_entry_t *mt_entry,
    const void                           *data
@@ -268,7 +273,8 @@
    rtems_filesystem_mount_table_entry_t       *mt_entry,
    const rtems_filesystem_operations_table    *op_table,
    const rtems_filesystem_file_handlers_r     *memfile_handlers,
-   const rtems_filesystem_file_handlers_r     *directory_handlers
+   const rtems_filesystem_file_handlers_r     *directory_handlers,
+   const rtems_filesystem_file_handlers_r     *fifo_handlers
 );
 
 extern int IMFS_fsunmount(

diff -u rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.26 rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.27
--- rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.26	Mon May 31 08:56:36 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_eval.c	Tue Jun  8 05:25:44 2010
@@ -58,7 +58,7 @@
       loc->handlers = fs_info->memfile_handlers;
       break;
     case IMFS_FIFO:
-      loc->handlers = &IMFS_fifo_handlers;
+      loc->handlers = fs_info->fifo_handlers;
       break;
   }
 

diff -u rtems/cpukit/libfs/src/imfs/imfs_init.c:1.17 rtems/cpukit/libfs/src/imfs/imfs_init.c:1.18
--- rtems/cpukit/libfs/src/imfs/imfs_init.c:1.17	Mon May 31 08:56:36 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_init.c	Tue Jun  8 05:25:44 2010
@@ -1,6 +1,12 @@
-/*
- *  IMFS Initialization
+/**
+ * @file
+ *
+ * @ingroup LibFSIMFS
  *
+ * @brief IMFS initialization.
+ */
+
+/*
  *  COPYRIGHT (c) 1989-1999.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -15,58 +21,41 @@
 #include "config.h"
 #endif
 
-#include <sys/types.h>         /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
 #include <rtems/libio_.h>
 
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- *  IMFS file system operations table
- */
+#include "imfs.h"
 
-const rtems_filesystem_operations_table  IMFS_ops = {
-  IMFS_eval_path,
-  IMFS_evaluate_for_make,
-  IMFS_link,
-  IMFS_unlink,
-  IMFS_node_type,
-  IMFS_mknod,
-  IMFS_chown,
-  IMFS_freenodinfo,
-  IMFS_mount,
-  IMFS_initialize,
-  IMFS_unmount,
-  IMFS_fsunmount,
-  IMFS_utime,
-  IMFS_evaluate_link,
-  IMFS_symlink,
-  IMFS_readlink,
-  IMFS_rename,
-  NULL
+const rtems_filesystem_operations_table IMFS_ops = {
+  .evalpath_h = IMFS_eval_path,
+  .evalformake_h = IMFS_evaluate_for_make,
+  .link_h = IMFS_link,
+  .unlink_h = IMFS_unlink,
+  .node_type_h = IMFS_node_type,
+  .mknod_h = IMFS_mknod,
+  .chown_h = IMFS_chown,
+  .freenod_h = IMFS_freenodinfo,
+  .mount_h = IMFS_mount,
+  .fsmount_me_h = IMFS_initialize,
+  .unmount_h = IMFS_unmount,
+  .fsunmount_me_h = IMFS_fsunmount,
+  .utime_h = IMFS_utime,
+  .eval_link_h = IMFS_evaluate_link,
+  .symlink_h = IMFS_symlink,
+  .readlink_h = IMFS_readlink,
+  .rename_h = IMFS_rename,
+  .statvfs_h = NULL
 };
 
-/*
- *  IMFS_initialize
- */
-
 int IMFS_initialize(
-  rtems_filesystem_mount_table_entry_t *temp_mt_entry,
+  rtems_filesystem_mount_table_entry_t *mt_entry,
   const void                           *data
 )
 {
-   return IMFS_initialize_support(
-     temp_mt_entry,
-     &IMFS_ops,
-     &IMFS_memfile_handlers,
-     &IMFS_directory_handlers
-   );
+  return IMFS_initialize_support(
+    mt_entry,
+    &IMFS_ops,
+    &IMFS_memfile_handlers,
+    &IMFS_directory_handlers,
+    &rtems_filesystem_null_handlers  /* for fifos */
+  );
 }

diff -u rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.21 rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.22
--- rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.21	Sat May 15 01:29:55 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_initsupp.c	Tue Jun  8 05:25:45 2010
@@ -66,7 +66,8 @@
   rtems_filesystem_mount_table_entry_t        *temp_mt_entry,
    const rtems_filesystem_operations_table    *op_table,
    const rtems_filesystem_file_handlers_r     *memfile_handlers,
-   const rtems_filesystem_file_handlers_r     *directory_handlers
+   const rtems_filesystem_file_handlers_r     *directory_handlers,
+   const rtems_filesystem_file_handlers_r     *fifo_handlers
 )
 {
   static int                             imfs_instance;
@@ -108,12 +109,10 @@
   fs_info->ino_count             = 1;
   fs_info->memfile_handlers      = memfile_handlers;
   fs_info->directory_handlers    = directory_handlers;
+  fs_info->fifo_handlers         = fifo_handlers;
 
   jnode = temp_mt_entry->mt_fs_root.node_access;
   jnode->st_ino = fs_info->ino_count;
 
-  /* Initialize POSIX FIFO/pipe module */
-  rtems_pipe_initialize();
-
   return 0;
 }

diff -u rtems/cpukit/libfs/src/imfs/miniimfs_init.c:1.14 rtems/cpukit/libfs/src/imfs/miniimfs_init.c:1.15
--- rtems/cpukit/libfs/src/imfs/miniimfs_init.c:1.14	Mon May 31 08:56:36 2010
+++ rtems/cpukit/libfs/src/imfs/miniimfs_init.c	Tue Jun  8 05:25:45 2010
@@ -1,6 +1,12 @@
-/*
- *  Mini-IMFS Initialization
+/**
+ * @file
+ *
+ * @ingroup LibFSIMFS
  *
+ * @brief Mini-IMFS initialization.
+ */
+
+/*
  *  COPYRIGHT (c) 1989-1999.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -15,58 +21,41 @@
 #include "config.h"
 #endif
 
-#include <sys/types.h>         /* for mkdir */
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <assert.h>
-
-#include "imfs.h"
 #include <rtems/libio_.h>
 
-#if defined(IMFS_DEBUG)
-#include <stdio.h>
-#endif
-
-/*
- *  miniIMFS file system operations table
- */
+#include "imfs.h"
 
-const rtems_filesystem_operations_table  miniIMFS_ops = {
-  IMFS_eval_path,
-  IMFS_evaluate_for_make,
-  NULL, /* XXX IMFS_link, */
-  NULL, /* XXX IMFS_unlink, */
-  IMFS_node_type,
-  IMFS_mknod,
-  NULL, /* XXX IMFS_chown, */
-  NULL, /* XXX IMFS_freenodinfo, */
-  NULL, /* XXX IMFS_mount, */
-  miniIMFS_initialize,
-  NULL, /* XXX IMFS_unmount, */
-  NULL, /* XXX IMFS_fsunmount, */
-  NULL, /* XXX IMFS_utime, */
-  NULL, /* XXX IMFS_evaluate_link, */
-  NULL, /* XXX IMFS_symlink, */
-  NULL, /* XXX IMFS_readlink */
-  NULL, /* XXX IMFS_rename */
-  NULL  /* XXX IMFS_statvfs */
+static const rtems_filesystem_operations_table miniIMFS_ops = {
+  .evalpath_h = IMFS_eval_path,
+  .evalformake_h = IMFS_evaluate_for_make,
+  .link_h = NULL,
+  .unlink_h = NULL,
+  .node_type_h = IMFS_node_type,
+  .mknod_h = IMFS_mknod,
+  .chown_h = NULL,
+  .freenod_h = NULL,
+  .mount_h = IMFS_mount,
+  .fsmount_me_h = miniIMFS_initialize,
+  .unmount_h = NULL,
+  .fsunmount_me_h = NULL,
+  .utime_h = NULL,
+  .eval_link_h = NULL,
+  .symlink_h = NULL,
+  .readlink_h = NULL,
+  .rename_h = NULL,
+  .statvfs_h = NULL
 };
 
-/*
- *  miniIMFS_initialize
- */
-
 int miniIMFS_initialize(
-  rtems_filesystem_mount_table_entry_t *temp_mt_entry,
+  rtems_filesystem_mount_table_entry_t *mt_entry,
   const void                           *data
 )
 {
-    return IMFS_initialize_support(
-      temp_mt_entry,
-      &miniIMFS_ops,
-      &rtems_filesystem_null_handlers,  /* for memfiles */
-      &rtems_filesystem_null_handlers   /* for directories */
-   );
+  return IMFS_initialize_support(
+    mt_entry,
+    &miniIMFS_ops,
+    &rtems_filesystem_null_handlers, /* for memfiles */
+    &rtems_filesystem_null_handlers, /* for directories */
+    &rtems_filesystem_null_handlers  /* for fifos */
+  );
 }

diff -u rtems/cpukit/libfs/src/pipe/fifo.c:1.4 rtems/cpukit/libfs/src/pipe/fifo.c:1.5
--- rtems/cpukit/libfs/src/pipe/fifo.c:1.4	Thu Dec 17 14:26:08 2009
+++ rtems/cpukit/libfs/src/pipe/fifo.c	Tue Jun  8 05:25:45 2010
@@ -21,6 +21,10 @@
 
 #include <errno.h>
 #include <stdlib.h>
+
+#include <rtems.h>
+#include <rtems/libio_.h>
+
 #include "pipe.h"
 
 
@@ -29,9 +33,7 @@
 #define LIBIO_ACCMODE(_iop) ((_iop)->flags & LIBIO_FLAGS_READ_WRITE)
 #define LIBIO_NODELAY(_iop) ((_iop)->flags & LIBIO_FLAGS_NO_DELAY)
 
-extern uint16_t rtems_pipe_no;
-static rtems_id rtems_pipe_semaphore = 0;
-extern bool rtems_pipe_configured;
+static rtems_id pipe_semaphore = RTEMS_ID_NONE;
 
 
 #define PIPE_EMPTY(_pipe) (_pipe->Length == 0)
@@ -82,7 +84,7 @@
 
 /*
  * Alloc pipe control structure, buffer, and resources.
- * Called with rtems_pipe_semaphore held.
+ * Called with pipe_semaphore held.
  */
 static int pipe_alloc(
   pipe_control_t **pipep
@@ -139,7 +141,7 @@
   return err;
 }
 
-/* Called with rtems_pipe_semaphore held. */
+/* Called with pipe_semaphore held. */
 static inline void pipe_free(
   pipe_control_t *pipe
 )
@@ -151,6 +153,48 @@
   free(pipe);
 }
 
+static rtems_status_code pipe_lock(void)
+{
+  rtems_status_code sc = RTEMS_SUCCESSFUL;
+
+  if (pipe_semaphore == RTEMS_ID_NONE) {
+    rtems_libio_lock();
+
+    if (pipe_semaphore == RTEMS_ID_NONE) {
+      sc = rtems_semaphore_create(
+        rtems_build_name('P', 'I', 'P', 'E'),
+        1,
+        RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
+        RTEMS_NO_PRIORITY,
+        &pipe_semaphore
+      );
+    }
+
+    rtems_libio_unlock();
+  }
+
+  if (sc == RTEMS_SUCCESSFUL) {
+    sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+  }
+
+  if (sc == RTEMS_SUCCESSFUL) {
+    return 0;
+  } else {
+    return -EINTR;
+  }
+}
+
+static void pipe_unlock(void)
+{
+  rtems_status_code sc = RTEMS_SUCCESSFUL;
+
+  sc = rtems_semaphore_release(pipe_semaphore);
+  if (sc != RTEMS_SUCCESSFUL) {
+    /* FIXME */
+    rtems_fatal_error_occurred(0xdeadbeef);
+  }
+}
+
 /*
  * If called with *pipep = NULL, pipe_new will call pipe_alloc to allocate a
  * pipe control structure and set *pipep to its address.
@@ -163,9 +207,9 @@
   pipe_control_t *pipe;
   int err = 0;
 
-  if (rtems_semaphore_obtain(rtems_pipe_semaphore,
-        RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
-    return -EINTR;
+  err = pipe_lock();
+  if (err)
+    return err;
 
   pipe = *pipep;
   if (pipe == NULL) {
@@ -185,7 +229,7 @@
   }
 
 out:
-  rtems_semaphore_release(rtems_pipe_semaphore);
+  pipe_unlock();
   return err;
 }
 
@@ -204,11 +248,16 @@
   uint32_t mode;
 
   rtems_status_code sc;
-  sc = rtems_semaphore_obtain(pipe->Semaphore,
-                              RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  /* WARN pipe not released! */
-  if(sc != RTEMS_SUCCESSFUL)
-    rtems_fatal_error_occurred(sc);
+
+  if (pipe_lock())
+    /* WARN pipe not freed and pipep not set to NULL! */
+    /* FIXME */
+    rtems_fatal_error_occurred(0xdeadbeef);
+
+  if (!PIPE_LOCK(pipe))
+    /* WARN pipe not released! */
+    /* FIXME */
+    rtems_fatal_error_occurred(0xdeadbeef);
 
   mode = LIBIO_ACCMODE(iop);
   if (mode & LIBIO_FLAGS_READ)
@@ -216,12 +265,6 @@
   if (mode & LIBIO_FLAGS_WRITE)
      pipe->Writers --;
 
-  sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
-                              RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-  /* WARN pipe not freed and pipep not set to NULL! */
-  if(sc != RTEMS_SUCCESSFUL)
-    rtems_fatal_error_occurred(sc);
-
   PIPE_UNLOCK(pipe);
 
   if (pipe->Readers == 0 && pipe->Writers == 0) {
@@ -239,7 +282,7 @@
   else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
     PIPE_WAKEUPREADERS(pipe);
 
-  rtems_semaphore_release(rtems_pipe_semaphore);
+  pipe_unlock();
 
 #if 0
   if (! delfile)
@@ -539,27 +582,3 @@
   /* Seek on pipe is not supported */
   return -ESPIPE;
 }
-
-/*
- * Initialization of FIFO/pipe module.
- */
-void rtems_pipe_initialize (void)
-{
-  if (!rtems_pipe_configured)
-    return;
-
-  if (rtems_pipe_semaphore)
-    return;
-
-  rtems_status_code sc;
-  sc = rtems_semaphore_create(
-        rtems_build_name ('P', 'I', 'P', 'E'), 1,
-        RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
-        RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
-  if (sc != RTEMS_SUCCESSFUL)
-    rtems_fatal_error_occurred (sc);
-
-  rtems_interval now;
-  now = rtems_clock_get_ticks_since_boot();
-  rtems_pipe_no = now;
-}

diff -u rtems/cpukit/libfs/src/pipe/pipe.h:1.3 rtems/cpukit/libfs/src/pipe/pipe.h:1.4
--- rtems/cpukit/libfs/src/pipe/pipe.h:1.3	Sun Nov 29 07:18:56 2009
+++ rtems/cpukit/libfs/src/pipe/pipe.h	Tue Jun  8 05:25:46 2010
@@ -109,11 +109,6 @@
   rtems_libio_t  *iop
 );
 
-/*
- * Initialization of FIFO/pipe module.
- */
-extern void rtems_pipe_initialize (void);
-
 #ifdef __cplusplus
 }
 #endif

diff -u rtems/cpukit/libfs/src/pipe/pipe.c:1.4 rtems/cpukit/libfs/src/pipe/pipe.c:1.5
--- rtems/cpukit/libfs/src/pipe/pipe.c:1.4	Sat Mar 27 22:14:08 2010
+++ rtems/cpukit/libfs/src/pipe/pipe.c	Tue Jun  8 05:25:46 2010
@@ -20,7 +20,8 @@
 #include <rtems/seterr.h>
 
 /* Incremental number added to names of anonymous pipe files */
-uint16_t rtems_pipe_no = 0;
+/* FIXME: This approach is questionable */
+static uint16_t rtems_pipe_no = 0;
 
 /*
  * Called by pipe() to create an anonymous pipe.
@@ -33,6 +34,7 @@
   rtems_libio_t *iop;
   int err = 0;
   /* Create /tmp if not exists */
+  /* FIXME: We should use a general mkdir function for this */
   if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
       != 0) {
     if (errno != ENOENT)

diff -u rtems/cpukit/sapi/include/confdefs.h:1.136 rtems/cpukit/sapi/include/confdefs.h:1.137
--- rtems/cpukit/sapi/include/confdefs.h:1.136	Mon Jun  7 10:35:24 2010
+++ rtems/cpukit/sapi/include/confdefs.h	Tue Jun  8 05:25:46 2010
@@ -293,7 +293,11 @@
  */ 
 #if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
     defined(CONFIGURE_FILESYSTEM_IMFS)
-#define CONFIGURE_FILESYSTEM_ENTRY_IMFS { "imfs", IMFS_initialize }
+  #if defined(CONFIGURE_PIPES_ENABLED)
+    #define CONFIGURE_FILESYSTEM_ENTRY_IMFS { "imfs", fifoIMFS_initialize }
+  #else
+    #define CONFIGURE_FILESYSTEM_ENTRY_IMFS { "imfs", IMFS_initialize }
+  #endif
 #endif
 
 /**
@@ -428,20 +432,6 @@
     };
   #endif
 
-  /**
-   *  This disables the inclusion of pipe support in the full IMFS.
-   *
-   *  NOTE: When building for coverage, we need this variable all the time.
-   */
-  #if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \
-      defined(RTEMS_COVERAGE)
-    #if defined(CONFIGURE_PIPES_ENABLED)
-      bool rtems_pipe_configured = true;
-    #else
-      bool rtems_pipe_configured = false;
-    #endif
-  #endif
-
   #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
     const rtems_filesystem_mount_table_t configuration_mount_table = {
       #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100608/d640e7f8/attachment-0001.html>


More information about the vc mailing list