[rtems commit] select.h, rtems_select.c, nds select: Add restrict keyword

Joel Sherrill joel at rtems.org
Thu Nov 21 00:18:13 UTC 2013


Module:    rtems
Branch:    master
Commit:    14876018c3e94f4c1c62aa512bebff1ee5307b79
Changeset: http://git.rtems.org/rtems/commit/?id=14876018c3e94f4c1c62aa512bebff1ee5307b79

Author:    Daniel Ramirez <javamonn at gmail.com>
Date:      Wed Nov 20 18:24:48 2013 -0600

select.h, rtems_select.c, nds select: Add restrict keyword

---

 .../arm/nds/dswifi/arm9/source/sgIP_sockets.c      |    3 ++-
 cpukit/libnetworking/rtems/rtems_select.c          |    3 ++-
 cpukit/libnetworking/sys/select.h                  |    8 ++++----
 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 e75ee42..199f37a 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 57e8c32..47a4cb2 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 fdd29de..8a84e4c 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
 }




More information about the vc mailing list