summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-14 16:55:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-15 10:01:43 +0200
commitda154e14f69e909a71ab0479c02dd56158f66ee0 (patch)
tree942675feba74c0ec16d60566fa32458c305daa2e /cpukit/libcsupport/src/sup_fs_eval_path_generic.c
parentFilesystem: Add const qualifier to lock/unlock (diff)
downloadrtems-da154e14f69e909a71ab0479c02dd56158f66ee0.tar.bz2
Filesystem: Move operations to mount table entry
The scope of the file system operations is the file system instance. The scope of the file system node handlers is the file location. The benefit of moving the operations to the mount table entry is a size reduction of the file location (rtems_filesystem_location_info_t). The code size is slightly increased due to additional load instructions. Restructure rtems_filesystem_mount_table_entry_t to improve cache efficiency.
Diffstat (limited to 'cpukit/libcsupport/src/sup_fs_eval_path_generic.c')
-rw-r--r--cpukit/libcsupport/src/sup_fs_eval_path_generic.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/sup_fs_eval_path_generic.c b/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
index d8629c64ab..27dd80145a 100644
--- a/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
+++ b/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
@@ -20,10 +20,11 @@
static bool is_fs_root( const rtems_filesystem_location_info_t *loc )
{
+ const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
const rtems_filesystem_location_info_t *mt_fs_root =
- &loc->mt_entry->mt_fs_root->location;
+ &mt_entry->mt_fs_root->location;
- return (*loc->ops->are_nodes_equal_h)( loc, mt_fs_root );
+ return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root );
}
static bool is_eval_path_root(
@@ -31,10 +32,11 @@ static bool is_eval_path_root(
const rtems_filesystem_location_info_t *loc
)
{
+ const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
- return loc->mt_entry == rootloc->mt_entry
- && (*loc->ops->are_nodes_equal_h)( loc, rootloc );
+ return mt_entry == rootloc->mt_entry
+ && (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
}
void rtems_filesystem_eval_path_generic(