[rtems commit] posix: Use unprotected chain operations
Sebastian Huber
sebh at rtems.org
Thu Jul 20 05:31:02 UTC 2017
Module: rtems
Branch: master
Commit: b965f461a8d2627fafb0166ed4ef0351ad597551
Changeset: http://git.rtems.org/rtems/commit/?id=b965f461a8d2627fafb0166ed4ef0351ad597551
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Jul 20 07:25:55 2017 +0200
posix: Use unprotected chain operations
Operarations are already protected by mmap_mappings_lock.
Updates #2859.
---
cpukit/posix/src/mmap.c | 2 +-
cpukit/posix/src/munmap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpukit/posix/src/mmap.c b/cpukit/posix/src/mmap.c
index e53cafa..ae68901 100644
--- a/cpukit/posix/src/mmap.c
+++ b/cpukit/posix/src/mmap.c
@@ -371,7 +371,7 @@ void *mmap(
rtems_libio_increment_mapping_refcnt(iop);
}
- rtems_chain_append( &mmap_mappings, &mapping->node );
+ rtems_chain_append_unprotected( &mmap_mappings, &mapping->node );
mmap_mappings_lock_release( );
diff --git a/cpukit/posix/src/munmap.c b/cpukit/posix/src/munmap.c
index 2d812ae..6bd79cc 100644
--- a/cpukit/posix/src/munmap.c
+++ b/cpukit/posix/src/munmap.c
@@ -63,7 +63,7 @@ int munmap(void *addr, size_t len)
mapping = (mmap_mapping*) node;
if ( ( addr >= mapping->addr ) &&
( addr < ( mapping->addr + mapping->len )) ) {
- rtems_chain_extract( node );
+ rtems_chain_extract_unprotected( node );
/* FIXME: generally need a way to clean-up the backing object, but
* currently it only matters for MAP_SHARED shm objects. */
if ( mapping->is_shared_shm == true ) {
More information about the vc
mailing list