1!  Copyright (C) 2005 Free Software Foundation, Inc.
2!  Contributed by Jakub Jelinek <jakub@redhat.com>.
3
4!  This file is part of the GNU OpenMP Library (libgomp).
5
6!  Libgomp is free software; you can redistribute it and/or modify it
7!  under the terms of the GNU Lesser General Public License as published by
8!  the Free Software Foundation; either version 2.1 of the License, or
9!  (at your option) any later version.
10
11!  Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
12!  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13!  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
14!  more details.
15
16!  You should have received a copy of the GNU Lesser General Public License
17!  along with libgomp; see the file COPYING.LIB.  If not, write to the
18!  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19!  MA 02110-1301, USA.  */
20
21!  As a special exception, if you link this library with other files, some
22!  of which are compiled with GCC, to produce an executable, this library
23!  does not by itself cause the resulting executable to be covered by the
24!  GNU General Public License.  This exception does not however invalidate
25!  any other reasons why the executable file might be covered by the GNU
26!  General Public License.
27
28      module omp_lib_kinds
29        integer, parameter :: omp_integer_kind = 4
30        integer, parameter :: omp_logical_kind = 4
31        integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
32        integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
33      end module
34
35      module omp_lib
36        use omp_lib_kinds
37        integer, parameter :: openmp_version = 200505
38
39        interface
40          subroutine omp_init_lock (lock)
41            use omp_lib_kinds
42            integer (omp_lock_kind), intent (out) :: lock
43          end subroutine omp_init_lock
44        end interface
45
46        interface
47          subroutine omp_init_nest_lock (lock)
48            use omp_lib_kinds
49            integer (omp_nest_lock_kind), intent (out) :: lock
50          end subroutine omp_init_nest_lock
51        end interface
52
53        interface
54          subroutine omp_destroy_lock (lock)
55            use omp_lib_kinds
56            integer (omp_lock_kind), intent (inout) :: lock
57          end subroutine omp_destroy_lock
58        end interface
59
60        interface
61          subroutine omp_destroy_nest_lock (lock)
62            use omp_lib_kinds
63            integer (omp_nest_lock_kind), intent (inout) :: lock
64          end subroutine omp_destroy_nest_lock
65        end interface
66
67        interface
68          subroutine omp_set_lock (lock)
69            use omp_lib_kinds
70            integer (omp_lock_kind), intent (inout) :: lock
71          end subroutine omp_set_lock
72        end interface
73
74        interface
75          subroutine omp_set_nest_lock (lock)
76            use omp_lib_kinds
77            integer (omp_nest_lock_kind), intent (inout) :: lock
78          end subroutine omp_set_nest_lock
79        end interface
80
81        interface
82          subroutine omp_unset_lock (lock)
83            use omp_lib_kinds
84            integer (omp_lock_kind), intent (inout) :: lock
85          end subroutine omp_unset_lock
86        end interface
87
88        interface
89          subroutine omp_unset_nest_lock (lock)
90            use omp_lib_kinds
91            integer (omp_nest_lock_kind), intent (inout) :: lock
92          end subroutine omp_unset_nest_lock
93        end interface
94
95        interface omp_set_dynamic
96          subroutine omp_set_dynamic (set)
97            logical (4), intent (in) :: set
98          end subroutine omp_set_dynamic
99          subroutine omp_set_dynamic_8 (set)
100            logical (8), intent (in) :: set
101          end subroutine omp_set_dynamic_8
102        end interface
103
104        interface omp_set_nested
105          subroutine omp_set_nested (set)
106            logical (4), intent (in) :: set
107          end subroutine omp_set_nested
108          subroutine omp_set_nested_8 (set)
109            logical (8), intent (in) :: set
110          end subroutine omp_set_nested_8
111        end interface
112
113        interface omp_set_num_threads
114          subroutine omp_set_num_threads (set)
115            integer (4), intent (in) :: set
116          end subroutine omp_set_num_threads
117          subroutine omp_set_num_threads_8 (set)
118            integer (8), intent (in) :: set
119          end subroutine omp_set_num_threads_8
120        end interface
121
122        interface
123          function omp_get_dynamic ()
124            use omp_lib_kinds
125            logical (omp_logical_kind) :: omp_get_dynamic
126          end function omp_get_dynamic
127        end interface
128
129        interface
130          function omp_get_nested ()
131            use omp_lib_kinds
132            logical (omp_logical_kind) :: omp_get_nested
133          end function omp_get_nested
134        end interface
135
136        interface
137          function omp_in_parallel ()
138            use omp_lib_kinds
139            logical (omp_logical_kind) :: omp_in_parallel
140          end function omp_in_parallel
141        end interface
142
143        interface
144          function omp_test_lock (lock)
145            use omp_lib_kinds
146            logical (omp_logical_kind) :: omp_test_lock
147            integer (omp_lock_kind), intent (inout) :: lock
148          end function omp_test_lock
149        end interface
150
151        interface
152          function omp_get_max_threads ()
153            use omp_lib_kinds
154            integer (omp_integer_kind) :: omp_get_max_threads
155          end function omp_get_max_threads
156        end interface
157
158        interface
159          function omp_get_num_procs ()
160            use omp_lib_kinds
161            integer (omp_integer_kind) :: omp_get_num_procs
162          end function omp_get_num_procs
163        end interface
164
165        interface
166          function omp_get_num_threads ()
167            use omp_lib_kinds
168            integer (omp_integer_kind) :: omp_get_num_threads
169          end function omp_get_num_threads
170        end interface
171
172        interface
173          function omp_get_thread_num ()
174            use omp_lib_kinds
175            integer (omp_integer_kind) :: omp_get_thread_num
176          end function omp_get_thread_num
177        end interface
178
179        interface
180          function omp_test_nest_lock (lock)
181            use omp_lib_kinds
182            integer (omp_integer_kind) :: omp_test_nest_lock
183            integer (omp_nest_lock_kind), intent (inout) :: lock
184          end function omp_test_nest_lock
185        end interface
186
187        interface
188          function omp_get_wtick ()
189            double precision :: omp_get_wtick
190          end function omp_get_wtick
191        end interface
192
193        interface
194          function omp_get_wtime ()
195            double precision :: omp_get_wtime
196          end function omp_get_wtime
197        end interface
198
199      end module omp_lib
200