1 /*
2  * This file is subject to the terms and conditions of the LGPL V2.1
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2019 Kalray Inc.
7  */
8 
9 #ifndef _SEMAPHORE_H
10 # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
11 #endif
12 
13 #include <bits/wordsize.h>
14 
15 #if __WORDSIZE == 64
16 # define __SIZEOF_SEM_T	32
17 #else
18 # define __SIZEOF_SEM_T	16
19 #endif
20 
21 
22 /* Value returned if `sem_open' failed.  */
23 #define SEM_FAILED      ((sem_t *) 0)
24 
25 
26 typedef union
27 {
28   char __size[__SIZEOF_SEM_T];
29   long int __align;
30 } sem_t;
31