summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Ramirez <javamonn@gmail.com>2013-11-20 18:24:48 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-11-20 18:24:48 -0600
commit14876018c3e94f4c1c62aa512bebff1ee5307b79 (patch)
treeb3444d9f664e96e29c2ef84224606bb0bc357f16
parentsparc.t: Correct for V8/V9 (diff)
downloadrtems-14876018c3e94f4c1c62aa512bebff1ee5307b79.tar.bz2
select.h, rtems_select.c, nds select: Add restrict keyword
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_sockets.c3
-rw-r--r--cpukit/libnetworking/rtems/rtems_select.c3
-rw-r--r--cpukit/libnetworking/sys/select.h8
3 files changed, 8 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_sockets.c b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_sockets.c
index e75ee42cf4..199f37a1a8 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_sockets.c
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_sockets.c
@@ -396,7 +396,8 @@ struct hostent * gethostbyname(const char * name) {
};
-extern int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) {
+extern int select(int nfds, fd_set *__restrict readfds, fd_set *__restrict writefds,
+ fd_set *__restrict errorfds, struct timeval *__restrict timeout) {
// 31 days = 2678400 seconds
unsigned long timeout_ms, lasttime, temp;
sgIP_Record_TCP * rec;
diff --git a/cpukit/libnetworking/rtems/rtems_select.c b/cpukit/libnetworking/rtems/rtems_select.c
index 57e8c328e5..47a4cb2982 100644
--- a/cpukit/libnetworking/rtems/rtems_select.c
+++ b/cpukit/libnetworking/rtems/rtems_select.c
@@ -110,7 +110,8 @@ selscan (rtems_id tid, fd_mask **ibits, fd_mask **obits, int nfd, int *retval)
}
int
-select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *tv)
+select (int nfds, fd_set *__restrict readfds, fd_set *__restrict writefds,
+ fd_set *__restrict exceptfds, struct timeval *__restrict tv)
{
fd_mask *ibits[3], *obits[3];
fd_set ob[3];
diff --git a/cpukit/libnetworking/sys/select.h b/cpukit/libnetworking/sys/select.h
index fdd29deab6..8a84e4cca6 100644
--- a/cpukit/libnetworking/sys/select.h
+++ b/cpukit/libnetworking/sys/select.h
@@ -57,10 +57,10 @@ struct selinfo {
(if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
after waiting the interval specified therein. Returns the number of ready
descriptors, or -1 for errors. */
-extern int select (int __nfds, fd_set *__readfds,
- fd_set *__writefds,
- fd_set *__exceptfds,
- struct timeval *__timeout);
+extern int select (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ struct timeval *__restrict __timeout);
#ifdef __cplusplus
}