POSIX Semaphore: Add restrict keyword per Single UNIX Specification

This commit is contained in:
Sahil Patnayakunii
2013-07-24 13:10:02 -05:00
committed by Joel Sherrill
parent 4343f5b4c7
commit cc86fe1fd2
3 changed files with 8 additions and 8 deletions

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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;