1 /* Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 Contributed by Jakub Jelinek <jakub@redhat.com>.
4 This file is part of the GNU Offloading and Multi Processing Library
7 Libgomp is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* This file contains prototypes of functions in the external ABI.
27 This file is included by files in the testsuite. */
34 #if (@OMP_LOCK_SIZE@ == @OMP_LOCK_KIND@) \
35 && (@OMP_LOCK_ALIGN@ <= @OMP_LOCK_SIZE@)
36 # define OMP_LOCK_DIRECT
37 typedef omp_lock_t
*omp_lock_arg_t
;
38 # define omp_lock_arg(arg) (arg)
40 typedef union { omp_lock_t
*lock
; uint64_t u
; } *omp_lock_arg_t
;
41 # define omp_lock_arg(arg) ((arg)->lock)
44 #if (@OMP_NEST_LOCK_SIZE@ == @OMP_NEST_LOCK_KIND@) \
45 && (@OMP_NEST_LOCK_ALIGN@ <= @OMP_NEST_LOCK_SIZE@)
46 # define OMP_NEST_LOCK_DIRECT
47 typedef omp_nest_lock_t
*omp_nest_lock_arg_t
;
48 # define omp_nest_lock_arg(arg) (arg)
50 typedef union { omp_nest_lock_t
*lock
; uint64_t u
; } *omp_nest_lock_arg_t
;
51 # define omp_nest_lock_arg(arg) ((arg)->lock)
54 #if (@OMP_LOCK_25_SIZE@ == @OMP_LOCK_25_KIND@) \
55 && (@OMP_LOCK_25_ALIGN@ <= @OMP_LOCK_25_SIZE@)
56 # define OMP_LOCK_25_DIRECT
57 typedef omp_lock_25_t
*omp_lock_25_arg_t
;
58 # define omp_lock_25_arg(arg) (arg)
60 typedef union { omp_lock_25_t
*lock
; uint64_t u
; } *omp_lock_25_arg_t
;
61 # define omp_lock_25_arg(arg) ((arg)->lock)
64 #if (@OMP_NEST_LOCK_25_SIZE@ == @OMP_NEST_LOCK_25_KIND@) \
65 && (@OMP_NEST_LOCK_25_ALIGN@ <= @OMP_NEST_LOCK_25_SIZE@)
66 # define OMP_NEST_LOCK_25_DIRECT
67 typedef omp_nest_lock_25_t
*omp_nest_lock_25_arg_t
;
68 # define omp_nest_lock_25_arg(arg) (arg)
70 typedef union { omp_nest_lock_25_t
*lock
; uint64_t u
; } *omp_nest_lock_25_arg_t
;
71 # define omp_nest_lock_25_arg(arg) ((arg)->lock)
75 omp_check_defines (void)
77 char test
[(@OMP_LOCK_SIZE@
!= sizeof (omp_lock_t
)
78 || @OMP_LOCK_ALIGN@
!= __alignof (omp_lock_t
)
79 || @OMP_NEST_LOCK_SIZE@
!= sizeof (omp_nest_lock_t
)
80 || @OMP_NEST_LOCK_ALIGN@
!= __alignof (omp_nest_lock_t
)
81 || @OMP_LOCK_KIND@
!= sizeof (*(omp_lock_arg_t
) 0)
82 || @OMP_NEST_LOCK_KIND@
!= sizeof (*(omp_nest_lock_arg_t
) 0)
83 || @INTPTR_T_KIND@
!= sizeof (omp_allocator_handle_t
)
84 || 4 != sizeof (omp_alloctrait_key_t
)
85 || @INTPTR_T_KIND@
!= sizeof (omp_alloctrait_value_t
)
86 || @INTPTR_T_KIND@
!= sizeof (omp_memspace_handle_t
)
87 || @OMP_DEPEND_KIND@
!= sizeof (omp_depend_t
))
88 ? -1 : 1] __attribute__ ((__unused__
));
89 char test2
[(@OMP_LOCK_25_SIZE@
!= sizeof (omp_lock_25_t
)
90 || @OMP_LOCK_25_ALIGN@
!= __alignof (omp_lock_25_t
)
91 || @OMP_NEST_LOCK_25_SIZE@
!= sizeof (omp_nest_lock_25_t
)
92 || @OMP_NEST_LOCK_25_ALIGN@
!= __alignof (omp_nest_lock_25_t
)
93 || @OMP_LOCK_25_KIND@
!= sizeof (*(omp_lock_25_arg_t
) 0)
94 || @OMP_NEST_LOCK_25_KIND@
95 != sizeof (*(omp_nest_lock_25_arg_t
) 0))
96 ? -1 : 1] __attribute__ ((__unused__
));
99 #endif /* LIBGOMP_F_H */