summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-14 16:53:49 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-15 10:01:43 +0200
commit7666afc97ab84f3d907cac9f7d083aa11354e56c (patch)
tree7b82e780dd0f50112f8b30c98fb2133fffcc3644 /cpukit
parentFilesystem: PR1255: Move offset update to handlers (diff)
downloadrtems-7666afc97ab84f3d907cac9f7d083aa11354e56c.tar.bz2
Filesystem: Add const qualifier to lock/unlock
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h8
-rw-r--r--cpukit/libcsupport/src/__usrenv.c2
-rw-r--r--cpukit/libfs/src/defaults/default_lock_and_unlock.c4
-rw-r--r--cpukit/libfs/src/dosfs/msdos.h4
-rw-r--r--cpukit/libfs/src/dosfs/msdos_init.c4
-rw-r--r--cpukit/libfs/src/nfsclient/src/nfs.c4
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems.c8
7 files changed, 19 insertions, 15 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index b42ff93dec..44dd847ebb 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -69,7 +69,7 @@ typedef enum {
* @see rtems_filesystem_default_lock().
*/
typedef void (*rtems_filesystem_mt_entry_lock_t)(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
);
/**
@@ -80,7 +80,7 @@ typedef void (*rtems_filesystem_mt_entry_lock_t)(
* @see rtems_filesystem_default_unlock().
*/
typedef void (*rtems_filesystem_mt_entry_unlock_t)(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
);
/**
@@ -523,7 +523,7 @@ extern const rtems_filesystem_operations_table
* @see rtems_filesystem_mt_entry_lock_t.
*/
void rtems_filesystem_default_lock(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
);
/**
@@ -532,7 +532,7 @@ void rtems_filesystem_default_lock(
* @see rtems_filesystem_mt_entry_unlock_t.
*/
void rtems_filesystem_default_unlock(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
);
/**
diff --git a/cpukit/libcsupport/src/__usrenv.c b/cpukit/libcsupport/src/__usrenv.c
index 87ff25b1e4..73d2b06366 100644
--- a/cpukit/libcsupport/src/__usrenv.c
+++ b/cpukit/libcsupport/src/__usrenv.c
@@ -51,7 +51,7 @@ const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers = {
};
static void null_op_lock_or_unlock(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
/* Do nothing */
diff --git a/cpukit/libfs/src/defaults/default_lock_and_unlock.c b/cpukit/libfs/src/defaults/default_lock_and_unlock.c
index de29a076f1..a88a99d4a5 100644
--- a/cpukit/libfs/src/defaults/default_lock_and_unlock.c
+++ b/cpukit/libfs/src/defaults/default_lock_and_unlock.c
@@ -19,14 +19,14 @@
#include <rtems/libio_.h>
void rtems_filesystem_default_lock(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
rtems_libio_lock();
}
void rtems_filesystem_default_unlock(
- rtems_filesystem_mount_table_entry_t *mt_entry
+ const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
rtems_libio_unlock();
diff --git a/cpukit/libfs/src/dosfs/msdos.h b/cpukit/libfs/src/dosfs/msdos.h
index 25f25b57a5..f762656607 100644
--- a/cpukit/libfs/src/dosfs/msdos.h
+++ b/cpukit/libfs/src/dosfs/msdos.h
@@ -252,9 +252,9 @@ int msdos_rename(
size_t new_namelen
);
-void msdos_lock(rtems_filesystem_mount_table_entry_t *mt_entry);
+void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry);
-void msdos_unlock(rtems_filesystem_mount_table_entry_t *mt_entry);
+void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry);
int msdos_initialize_support(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
diff --git a/cpukit/libfs/src/dosfs/msdos_init.c b/cpukit/libfs/src/dosfs/msdos_init.c
index 589ba1c0fe..544fef49be 100644
--- a/cpukit/libfs/src/dosfs/msdos_init.c
+++ b/cpukit/libfs/src/dosfs/msdos_init.c
@@ -51,7 +51,7 @@ const rtems_filesystem_operations_table msdos_ops = {
.statvfs_h = rtems_filesystem_default_statvfs
};
-void msdos_lock(rtems_filesystem_mount_table_entry_t *mt_entry)
+void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
@@ -64,7 +64,7 @@ void msdos_lock(rtems_filesystem_mount_table_entry_t *mt_entry)
}
}
-void msdos_unlock(rtems_filesystem_mount_table_entry_t *mt_entry)
+void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_release(fs_info->vol_sema);
diff --git a/cpukit/libfs/src/nfsclient/src/nfs.c b/cpukit/libfs/src/nfsclient/src/nfs.c
index 95613c0222..0f33cf39ad 100644
--- a/cpukit/libfs/src/nfsclient/src/nfs.c
+++ b/cpukit/libfs/src/nfsclient/src/nfs.c
@@ -2086,11 +2086,11 @@ static int nfs_rename(
return rv;
}
-static void nfs_lock(rtems_filesystem_mount_table_entry_t *mt_entry)
+static void nfs_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
}
-static void nfs_unlock(rtems_filesystem_mount_table_entry_t *mt_entry)
+static void nfs_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
}
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index 6f6d3287c3..9a245f5f3b 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -73,7 +73,9 @@ rtems_rfs_rtems_node_type_by_inode (rtems_rfs_inode_handle* inode)
}
static void
-rtems_rfs_rtems_lock_by_mt_entry (rtems_filesystem_mount_table_entry_t *mt_entry)
+rtems_rfs_rtems_lock_by_mt_entry (
+ const rtems_filesystem_mount_table_entry_t *mt_entry
+)
{
rtems_rfs_file_system* fs = mt_entry->fs_info;
@@ -81,7 +83,9 @@ rtems_rfs_rtems_lock_by_mt_entry (rtems_filesystem_mount_table_entry_t *mt_entry
}
static void
-rtems_rfs_rtems_unlock_by_mt_entry (rtems_filesystem_mount_table_entry_t *mt_entry)
+rtems_rfs_rtems_unlock_by_mt_entry (
+ const rtems_filesystem_mount_table_entry_t *mt_entry
+)
{
rtems_rfs_file_system* fs = mt_entry->fs_info;