]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgomp/config/rtems/sem.h
Update copyright years.
[thirdparty/gcc.git] / libgomp / config / rtems / sem.h
index e7c72366e5aa70cd04ff51bc5c1ec24b14ff99a6..bbbb0b09e139315d7af57f8add652518deb35a47 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2015-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2015-2024 Free Software Foundation, Inc.
    Contributed by Sebastian Huber <sebastian.huber@embedded-brains.de>.
 
    This file is part of the GNU OpenMP Library (libgomp).
@@ -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);