From ddf59c36d90606ab0bfcdea99e1b01e98274eeb0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 19 Mar 2018 01:46:27 +0100 Subject: Synchronize semaphore.h with glibc * sysdeps/pthread/semaphore.h (SEM_FAILED, sem_t): Move definitions to... * sysdeps/pthread/bits/semaphore.h: ... this file. --- sysdeps/pthread/bits/semaphore.h | 4 ++++ sysdeps/pthread/semaphore.h | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/pthread/bits/semaphore.h b/sysdeps/pthread/bits/semaphore.h index 12c0bfb..1b20f75 100644 --- a/sysdeps/pthread/bits/semaphore.h +++ b/sysdeps/pthread/bits/semaphore.h @@ -36,6 +36,10 @@ struct __semaphore void *__data; }; +typedef struct __semaphore sem_t; + +#define SEM_FAILED ((void *) 0) + /* Initializer for a semaphore. */ #define __SEMAPHORE_INITIALIZER(pshared, value) \ { __PTHREAD_SPIN_LOCK_INITIALIZER, NULL, (pshared), (value), NULL } diff --git a/sysdeps/pthread/semaphore.h b/sysdeps/pthread/semaphore.h index a6f96e3..bb8c1b2 100644 --- a/sysdeps/pthread/semaphore.h +++ b/sysdeps/pthread/semaphore.h @@ -24,16 +24,12 @@ # include #endif -/* Get the definition for struct __semaphore. */ +/* Get the definition for sem_t. */ #include __BEGIN_DECLS -#define SEM_FAILED ((void *) 0) - -typedef struct __semaphore sem_t; - /* Initialize semaphore *SEM with value VALUE. */ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW; -- cgit v1.2.3