[rtems commit] POSIX mqueue.h: Add restrict keyword per Single UNIX Specification

Joel Sherrill joel at rtems.org
Wed Jul 24 18:08:28 UTC 2013


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

Author:    Sahil Patnayakunii <sahilp at rtems.org>
Date:      Wed Jul 24 13:08:37 2013 -0500

POSIX mqueue.h: Add restrict keyword per Single UNIX Specification

---

 cpukit/posix/include/mqueue.h         |   10 +++++-----
 cpukit/posix/src/mqueuesetattr.c      |    4 ++--
 cpukit/posix/src/mqueuetimedreceive.c |    6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/cpukit/posix/include/mqueue.h b/cpukit/posix/include/mqueue.h
index 34a6065..5c121e9 100644
--- a/cpukit/posix/include/mqueue.h
+++ b/cpukit/posix/include/mqueue.h
@@ -163,10 +163,10 @@ ssize_t mq_receive(
 
 ssize_t mq_timedreceive(
   mqd_t                  mqdes,
-  char                  *msg_ptr,
+  char                  *__restrict msg_ptr,
   size_t                 msg_len,
-  unsigned int          *msg_prio,
-  const struct timespec *abstime
+  unsigned int          *__restrict msg_prio,
+  const struct timespec *__restrict abstime
 );
 
 #endif /* _POSIX_TIMEOUTS */
@@ -193,8 +193,8 @@ int mq_notify(
  */
 int mq_setattr(
   mqd_t                 mqdes,
-  const struct mq_attr *mqstat,
-  struct mq_attr       *omqstat
+  const struct mq_attr *__restrict mqstat,
+  struct mq_attr       *__restrict omqstat
 );
 
 /*
diff --git a/cpukit/posix/src/mqueuesetattr.c b/cpukit/posix/src/mqueuesetattr.c
index 09a31d6..fc9cfaa 100644
--- a/cpukit/posix/src/mqueuesetattr.c
+++ b/cpukit/posix/src/mqueuesetattr.c
@@ -34,8 +34,8 @@
 
 int mq_setattr(
   mqd_t                 mqdes,
-  const struct mq_attr *mqstat,
-  struct mq_attr       *omqstat
+  const struct mq_attr *__restrict mqstat,
+  struct mq_attr       *__restrict omqstat
 )
 {
   POSIX_Message_queue_Control_fd *the_mq_fd;
diff --git a/cpukit/posix/src/mqueuetimedreceive.c b/cpukit/posix/src/mqueuetimedreceive.c
index c4868d6..81dd11a 100644
--- a/cpukit/posix/src/mqueuetimedreceive.c
+++ b/cpukit/posix/src/mqueuetimedreceive.c
@@ -54,10 +54,10 @@
 
 ssize_t mq_timedreceive(
   mqd_t                  mqdes,
-  char                  *msg_ptr,
+  char                  *__restrict msg_ptr,
   size_t                 msg_len,
-  unsigned int          *msg_prio,
-  const struct timespec *abstime
+  unsigned int          *__restrict msg_prio,
+  const struct timespec *__restrict abstime
 )
 {
   Watchdog_Interval                            ticks;




More information about the vc mailing list