summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorDaniel Ramirez <javamonn@gmail.com>2013-11-21 16:54:21 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-21 16:56:48 -0600
commitbb81e04ae3a88ce37de8718ef112ace59b3975af (patch)
tree3ade9b3de36057f6ba755cd74a17aa63c2eb7729 /cpukit
parentscore/rbtree: Remove "unprotected" from API (diff)
downloadrtems-bb81e04ae3a88ce37de8718ef112ace59b3975af.tar.bz2
statvfs and ALL filesystem handlers: Add restrict keyword.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h8
-rw-r--r--cpukit/libcsupport/include/sys/statvfs.h2
-rw-r--r--cpukit/libcsupport/src/__usrenv.c4
-rw-r--r--cpukit/libcsupport/src/statvfs.c2
-rw-r--r--cpukit/libfs/src/defaults/default_statvfs.c4
-rw-r--r--cpukit/libfs/src/dosfs/msdos.h13
-rw-r--r--cpukit/libfs/src/dosfs/msdos_dir.c4
-rw-r--r--cpukit/libfs/src/dosfs/msdos_file.c4
-rw-r--r--cpukit/libfs/src/dosfs/msdos_statvfs.c5
-rw-r--r--cpukit/libfs/src/jffs2/src/fs-rtems.c4
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems.c5
11 files changed, 29 insertions, 26 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 21d57ebddf..c1b7b73d7f 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -485,8 +485,8 @@ typedef int (*rtems_filesystem_rename_t)(
* @see rtems_filesystem_default_statvfs().
*/
typedef int (*rtems_filesystem_statvfs_t)(
- const rtems_filesystem_location_info_t *loc,
- struct statvfs *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct statvfs *__restrict buf
);
/**
@@ -738,8 +738,8 @@ int rtems_filesystem_default_rename(
* @see rtems_filesystem_statvfs_t.
*/
int rtems_filesystem_default_statvfs(
- const rtems_filesystem_location_info_t *loc,
- struct statvfs *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct statvfs *__restrict buf
);
/** @} */
diff --git a/cpukit/libcsupport/include/sys/statvfs.h b/cpukit/libcsupport/include/sys/statvfs.h
index eccc7d2881..01f827e297 100644
--- a/cpukit/libcsupport/include/sys/statvfs.h
+++ b/cpukit/libcsupport/include/sys/statvfs.h
@@ -50,7 +50,7 @@ struct statvfs
unsigned long f_namemax; /**< Maximum filename length. */
};
-extern int statvfs(const char *, struct statvfs *);
+extern int statvfs(const char *__restrict , struct statvfs *__restrict);
extern int fstatvfs(int, struct statvfs *);
#ifdef __cplusplus
diff --git a/cpukit/libcsupport/src/__usrenv.c b/cpukit/libcsupport/src/__usrenv.c
index 8e9e8c15ad..88058c4714 100644
--- a/cpukit/libcsupport/src/__usrenv.c
+++ b/cpukit/libcsupport/src/__usrenv.c
@@ -186,8 +186,8 @@ static int null_op_rename(
}
static int null_op_statvfs(
- const rtems_filesystem_location_info_t *loc,
- struct statvfs *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct statvfs *__restrict buf
)
{
return -1;
diff --git a/cpukit/libcsupport/src/statvfs.c b/cpukit/libcsupport/src/statvfs.c
index 163d51eb1a..dfca09f529 100644
--- a/cpukit/libcsupport/src/statvfs.c
+++ b/cpukit/libcsupport/src/statvfs.c
@@ -19,7 +19,7 @@
#include <rtems/libio_.h>
-int statvfs( const char *path, struct statvfs *buf )
+int statvfs( const char *__restrict path, struct statvfs *__restrict buf )
{
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
diff --git a/cpukit/libfs/src/defaults/default_statvfs.c b/cpukit/libfs/src/defaults/default_statvfs.c
index 139d0b0742..41ac1c0a46 100644
--- a/cpukit/libfs/src/defaults/default_statvfs.c
+++ b/cpukit/libfs/src/defaults/default_statvfs.c
@@ -21,8 +21,8 @@
#include <rtems/seterr.h>
int rtems_filesystem_default_statvfs(
- const rtems_filesystem_location_info_t *loc,
- struct statvfs *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct statvfs *__restrict buf
)
{
rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/libfs/src/dosfs/msdos.h b/cpukit/libfs/src/dosfs/msdos.h
index 6da47cc5e2..2fa3b58887 100644
--- a/cpukit/libfs/src/dosfs/msdos.h
+++ b/cpukit/libfs/src/dosfs/msdos.h
@@ -312,8 +312,9 @@ int msdos_rename(
size_t new_namelen
);
-int msdos_statvfs(const rtems_filesystem_location_info_t *root_loc,
- struct statvfs *sb);
+int msdos_statvfs(
+ const rtems_filesystem_location_info_t *__restrict root_loc,
+ struct statvfs *__restrict sb);
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry);
@@ -347,8 +348,8 @@ ssize_t msdos_file_write(
);
int msdos_file_stat(
- const rtems_filesystem_location_info_t *loc,
- struct stat *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct stat *__restrict buf
);
int
@@ -370,8 +371,8 @@ ssize_t msdos_dir_read(
int msdos_dir_sync(rtems_libio_t *iop);
int msdos_dir_stat(
- const rtems_filesystem_location_info_t *loc,
- struct stat *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct stat *__restrict buf
);
/**
diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c
index d7f6823ec9..ffc9f7f7a9 100644
--- a/cpukit/libfs/src/dosfs/msdos_dir.c
+++ b/cpukit/libfs/src/dosfs/msdos_dir.c
@@ -383,8 +383,8 @@ msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
*/
int
msdos_dir_stat(
- const rtems_filesystem_location_info_t *loc,
- struct stat *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct stat *__restrict buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diff --git a/cpukit/libfs/src/dosfs/msdos_file.c b/cpukit/libfs/src/dosfs/msdos_file.c
index b19b848786..03bf6d608e 100644
--- a/cpukit/libfs/src/dosfs/msdos_file.c
+++ b/cpukit/libfs/src/dosfs/msdos_file.c
@@ -189,8 +189,8 @@ msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
*/
int
msdos_file_stat(
- const rtems_filesystem_location_info_t *loc,
- struct stat *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct stat *__restrict buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diff --git a/cpukit/libfs/src/dosfs/msdos_statvfs.c b/cpukit/libfs/src/dosfs/msdos_statvfs.c
index 1a1d974fc3..87d863ed86 100644
--- a/cpukit/libfs/src/dosfs/msdos_statvfs.c
+++ b/cpukit/libfs/src/dosfs/msdos_statvfs.c
@@ -18,8 +18,9 @@
#include "fat_fat_operations.h"
#include "msdos.h"
-int msdos_statvfs(const rtems_filesystem_location_info_t *root_loc,
- struct statvfs *sb)
+int msdos_statvfs(
+ const rtems_filesystem_location_info_t *__restrict root_loc,
+ struct statvfs *__restrict sb)
{
msdos_fs_info_t *fs_info = root_loc->mt_entry->fs_info;
fat_vol_t *vol = &fs_info->fat.vol;
diff --git a/cpukit/libfs/src/jffs2/src/fs-rtems.c b/cpukit/libfs/src/jffs2/src/fs-rtems.c
index 376c77f45f..1b7d719e69 100644
--- a/cpukit/libfs/src/jffs2/src/fs-rtems.c
+++ b/cpukit/libfs/src/jffs2/src/fs-rtems.c
@@ -1015,8 +1015,8 @@ static int rtems_jffs2_rename(
}
static int rtems_jffs2_statvfs(
- const rtems_filesystem_location_info_t *loc,
- struct statvfs *buf
+ const rtems_filesystem_location_info_t *__restrict loc,
+ struct statvfs *__restrict buf
)
{
struct _inode *inode = rtems_jffs2_get_inode_by_location(loc);
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index 100f70c538..5f30cf75ed 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -740,8 +740,9 @@ rtems_rfs_rtems_rename(const rtems_filesystem_location_info_t* old_parent_loc,
* @return int
*/
static int
-rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
- struct statvfs* sb)
+rtems_rfs_rtems_statvfs (
+ const rtems_filesystem_location_info_t *__restrict pathloc,
+ struct statvfs *__restrict sb)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;