[rtems commit] POSIX Semaphore: 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: cc86fe1fd20fc116e7709e9504a4e08418606e8d
Changeset: http://git.rtems.org/rtems/commit/?id=cc86fe1fd20fc116e7709e9504a4e08418606e8d
Author: Sahil Patnayakunii <sahilp at rtems.org>
Date: Wed Jul 24 13:10:02 2013 -0500
POSIX Semaphore: Add restrict keyword per Single UNIX Specification
---
cpukit/posix/include/semaphore.h | 8 ++++----
cpukit/posix/src/semgetvalue.c | 4 ++--
cpukit/posix/src/semtimedwait.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/cpukit/posix/include/semaphore.h b/cpukit/posix/include/semaphore.h
index 489258e..109766f 100644
--- a/cpukit/posix/include/semaphore.h
+++ b/cpukit/posix/include/semaphore.h
@@ -124,8 +124,8 @@ int sem_trywait(
* @brief Lock a semaphore.
*/
int sem_timedwait(
- sem_t *sem,
- const struct timespec *timeout
+ sem_t *__restrict sem,
+ const struct timespec *__restrict timeout
);
#endif
@@ -144,8 +144,8 @@ int sem_post(
* 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229
*/
int sem_getvalue(
- sem_t *sem,
- int *sval
+ sem_t *__restrict sem,
+ int *__restrict sval
);
#endif /* _POSIX_SEMAPHORES */
diff --git a/cpukit/posix/src/semgetvalue.c b/cpukit/posix/src/semgetvalue.c
index 3e584e2..b0ffec3 100644
--- a/cpukit/posix/src/semgetvalue.c
+++ b/cpukit/posix/src/semgetvalue.c
@@ -33,8 +33,8 @@
#include <rtems/seterr.h>
int sem_getvalue(
- sem_t *sem,
- int *sval
+ sem_t *__restrict sem,
+ int *__restrict sval
)
{
register POSIX_Semaphore_Control *the_semaphore;
diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c
index 6d41579..f9e57ec 100644
--- a/cpukit/posix/src/semtimedwait.c
+++ b/cpukit/posix/src/semtimedwait.c
@@ -39,8 +39,8 @@
*/
int sem_timedwait(
- sem_t *sem,
- const struct timespec *abstime
+ sem_t *__restrict sem,
+ const struct timespec *__restrict abstime
)
{
Watchdog_Interval ticks;
More information about the vc
mailing list