public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-10] RTEMS: Fix libgomp build
@ 2021-01-22 19:51 Kwok Yeung
  0 siblings, 0 replies; only message in thread
From: Kwok Yeung @ 2021-01-22 19:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f61fbb53ecf775cd491794f14847c2f1ebc88951

commit f61fbb53ecf775cd491794f14847c2f1ebc88951
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Mon Jan 18 07:23:46 2021 +0100

    RTEMS: Fix libgomp build
    
    libgomp/
    
            * config/rtems/sem.h (gomp_sem_getcount): New function.
    
    (cherry picked from commit 0f951b3dd34b355579b4c9a9e287d32ac771bc67)

Diff:
---
 libgomp/ChangeLog.omp      | 7 +++++++
 libgomp/config/rtems/sem.h | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 632b86989c3..bc500000af8 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,10 @@
+2021-01-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+	Backport from mainline
+	2021-01-18  Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+	* config/rtems/sem.h (gomp_sem_getcount): New function.
+
 2021-01-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
 	Backport from mainline
diff --git a/libgomp/config/rtems/sem.h b/libgomp/config/rtems/sem.h
index cc7faa7ec1e..5765560e26b 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-22 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 19:51 [gcc/devel/omp/gcc-10] RTEMS: Fix libgomp build Kwok Yeung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).