Index: cpukit/posix/include/rtems/posix/mmanimpl.h
===================================================================
--- cpukit/posix/include/rtems/posix/mmanimpl.h	(revision b965f461a8d2627fafb0166ed4ef0351ad597551)
+++ cpukit/posix/include/rtems/posix/mmanimpl.h	(revision b264998fa9ef2b048950ba81f3d1615c8f9a182d)
@@ -40,6 +40,13 @@
 extern rtems_chain_control mmap_mappings;
 
-bool mmap_mappings_lock_obtain( void );
-bool mmap_mappings_lock_release( void );
+static inline void mmap_mappings_lock_obtain( void )
+{
+  rtems_libio_lock();
+}
+
+static inline void mmap_mappings_lock_release( void )
+{
+  rtems_libio_unlock();
+}
 
 #ifdef __cplusplus
Index: cpukit/posix/src/mmap.c
===================================================================
--- cpukit/posix/src/mmap.c	(revision b965f461a8d2627fafb0166ed4ef0351ad597551)
+++ cpukit/posix/src/mmap.c	(revision b264998fa9ef2b048950ba81f3d1615c8f9a182d)
@@ -29,83 +29,9 @@
 #include <rtems/posix/shmimpl.h>
 
-#define RTEMS_MUTEX_ATTRIBS \
-  (RTEMS_PRIORITY | RTEMS_SIMPLE_BINARY_SEMAPHORE | \
-   RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
 
 /**
- * Mmap chain of mappings.
+ * mmap chain of mappings.
  */
-rtems_chain_control mmap_mappings;
-
-/**
- * The id of the MMAP lock.
- */
-static rtems_id mmap_mappings_lock;
-
-/**
- * Create the lock.
- */
-static
-bool mmap_mappings_lock_create(
-  void
-)
-{
-  /*
-   * Lock the mapping table. We only create a lock if a call is made. First we
-   * test if a mapping lock is present. If one is present we lock it. If not
-   * the libio lock is locked and we then test the mapping lock again. If not
-   * present we create the mapping lock then release libio lock.
-   */
-  /* FIXME: double-checked locking anti-pattern. */
-  if ( mmap_mappings_lock == 0 ) {
-    rtems_status_code sc = RTEMS_SUCCESSFUL;
-    rtems_chain_initialize_empty( &mmap_mappings );
-    rtems_semaphore_obtain( rtems_libio_semaphore,
-                            RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-    /* FIXME: account for semaphore in confdefs, or maybe just use the
-     * rtems_libio_semaphore? */
-    if ( mmap_mappings_lock == 0 )
-      sc = rtems_semaphore_create( rtems_build_name( 'M', 'M', 'A', 'P' ),
-                                   1,
-                                   RTEMS_MUTEX_ATTRIBS,
-                                   RTEMS_NO_PRIORITY,
-                                   &mmap_mappings_lock );
-    rtems_semaphore_release( rtems_libio_semaphore );
-    if ( sc != RTEMS_SUCCESSFUL ) {
-      errno = EINVAL;
-      return false;
-    }
-  }
-  return true;
-}
-
-bool mmap_mappings_lock_obtain(
-  void
-)
-{
-  if ( mmap_mappings_lock_create( ) ) {
-    rtems_status_code sc;
-    sc = rtems_semaphore_obtain( mmap_mappings_lock,
-                                 RTEMS_WAIT, RTEMS_NO_TIMEOUT );
-    if ( sc != RTEMS_SUCCESSFUL ) {
-      errno = EINVAL;
-      return false;
-    }
-  }
-  return true;
-}
-
-bool mmap_mappings_lock_release(
-  void
-)
-{
-  rtems_status_code sc;
-  sc = rtems_semaphore_release( mmap_mappings_lock );
-  if (( sc != RTEMS_SUCCESSFUL ) && ( errno == 0 )) {
-    errno = EINVAL;
-    return false;
-  }
-  return true;
-}
+CHAIN_DEFINE_EMPTY( mmap_mappings );
 
 void *mmap(
@@ -308,7 +234,5 @@
   }
 
-  /* Lock access to mmap_mappings. Sets errno on failure. */
-  if ( !mmap_mappings_lock_obtain( ) )
-    return MAP_FAILED;
+  mmap_mappings_lock_obtain();
 
   if ( map_fixed ) {
Index: cpukit/posix/src/munmap.c
===================================================================
--- cpukit/posix/src/munmap.c	(revision b965f461a8d2627fafb0166ed4ef0351ad597551)
+++ cpukit/posix/src/munmap.c	(revision b264998fa9ef2b048950ba81f3d1615c8f9a182d)
@@ -53,9 +53,5 @@
   }
 
-  /*
-   * Obtain the mmap lock. Sets errno on failure.
-   */
-  if ( !mmap_mappings_lock_obtain( ))
-    return -1;
+  mmap_mappings_lock_obtain();
 
   node = rtems_chain_first (&mmap_mappings);
