diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-01-18 07:23:46 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-01-18 07:24:56 +0100 |
commit | 0f951b3dd34b355579b4c9a9e287d32ac771bc67 (patch) | |
tree | 117066a63309f86891b0384d512dda7670e718e0 | |
parent | d3b41bde961713ff4af7e18011126434c497edba (diff) | |
download | gcc-0f951b3dd34b355579b4c9a9e287d32ac771bc67.zip gcc-0f951b3dd34b355579b4c9a9e287d32ac771bc67.tar.gz gcc-0f951b3dd34b355579b4c9a9e287d32ac771bc67.tar.bz2 |
RTEMS: Fix libgomp build
libgomp/
* config/rtems/sem.h (gomp_sem_getcount): New function.
-rw-r--r-- | libgomp/config/rtems/sem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgomp/config/rtems/sem.h b/libgomp/config/rtems/sem.h index 50b650a..0cd7415 100644 --- a/libgomp/config/rtems/sem.h +++ b/libgomp/config/rtems/sem.h @@ -47,6 +47,11 @@ static inline void gomp_sem_post (gomp_sem_t *sem) _Semaphore_Post (sem); } +static inline int gomp_sem_getcount (gomp_sem_t *sem) +{ + return (int) __atomic_load_n (&sem->_count, MEMMODEL_RELAXED); +} + static inline void gomp_sem_destroy (gomp_sem_t *sem) { _Semaphore_Destroy (sem); |