-/* 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).
_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);