From c00b85b0e99b793923d585f88a3b1fb42e32b052 Mon Sep 17 00:00:00 2001 From: Nicholas Lowell Date: Wed, 12 Aug 2020 13:33:04 -0400 Subject: [PATCH] posix: semaphore: use ZRESTRICT To better handle all possible definitions of restrict or __restrict keyword and avoid redefinition errors, use the ZRESTRICT pre-processor defined in toolchain.h Signed-off-by: Nicholas Lowell --- include/posix/semaphore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/posix/semaphore.h b/include/posix/semaphore.h index f19c741a1b7..e4f5f8ce665 100644 --- a/include/posix/semaphore.h +++ b/include/posix/semaphore.h @@ -14,10 +14,10 @@ extern "C" { #endif int sem_destroy(sem_t *semaphore); -int sem_getvalue(sem_t *restrict semaphore, int *restrict value); +int sem_getvalue(sem_t *ZRESTRICT semaphore, int *ZRESTRICT value); int sem_init(sem_t *semaphore, int pshared, unsigned int value); int sem_post(sem_t *semaphore); -int sem_timedwait(sem_t *restrict semaphore, struct timespec *restrict abstime); +int sem_timedwait(sem_t *ZRESTRICT semaphore, struct timespec *ZRESTRICT abstime); int sem_trywait(sem_t *semaphore); int sem_wait(sem_t *semaphore);