OSDN Git Service

PR libgomp/36471
[pf3gnuchains/gcc-fork.git] / libgomp / ChangeLog
1 2008-06-11  Jakub Jelinek  <jakub@redhat.com>
2
3         PR libgomp/36471
4         * omp_lib.f90.in (omp_get_ancestor_thread_num_8,
5         omp_get_team_size_8): Fix pastos.
6
7         PR libgomp/36469
8         * configure.ac: Add AC_CHECK_FUNCS (strtoull).
9         * configure: Regenerated.
10         * config.h.in: Regenerated.
11         * env.c (strtoull): Define to strtoul if HAVE_STRTOULL is not
12         defined.
13
14 2008-06-06  Andreas Tobler  <a.tobler@schweiz.org>
15
16         PR bootstrap/36452
17         * loop_ull.c (GOMP_loop_ull_static_start): Adjust API.
18         (GOMP_loop_ull_dynamic_start): Likewise.
19         (GOMP_loop_ull_guided_start): Likewise.
20         (GOMP_loop_ull_ordered_static_start): Likewise.
21         (GOMP_loop_ull_ordered_dynamic_start): Likewise.
22         (GOMP_loop_ull_ordered_guided_start): Likewise.
23
24 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
25             Richard Henderson  <rth@redhat.com>
26             Ulrich Drepper  <drepper@redhat.com>
27             Jakob Blomer  <jakob.blomer@ira.uka.de>
28
29         * configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
30         Substitute also OMP_*LOCK_25*.
31         * configure: Regenerated.
32         * config.h.in: Regenerated.
33         * Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
34         ptrlock.c and task.c.
35         * Makefile.in: Regenerated.
36         * testsuite/Makefile.in: Regenerated.
37         * task.c: New file.
38         * loop_ull.c: New file.
39         * iter_ull.c: New file.
40         * libgomp.h: Include ptrlock.h.
41         (enum gomp_task_kind): New type.
42         (struct gomp_team): Add task_lock, task_queue, task_count,
43         task_running_count, single_count fields.  Add
44         work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
45         Remove work_share_lock, generation_mask,
46         oldest_live_gen, num_live_gen and init_work_shares fields, add
47         work work_share_list_alloc, work_share_list_free and work_share_chunk
48         fields.  Change work_shares from pointer to pointers into an array.
49         Change ordered_release field into gomp_sem_t ** from flexible array
50         member.  Add implicit_task and initial_work_shares fields.
51         Move close to the end of the struct.
52         (struct gomp_team_state): Add single_count, last_work_share,
53         active_level and level fields, remove work_share_generation.
54         (gomp_barrier_handle_tasks): New prototype.
55         (gomp_finish_task): New inline function.
56         (struct gomp_work_share): Move chunk_size, end, incr into
57         transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
58         next_ll fields.  Reshuffle fields.  Add next_alloc,
59         next_ws, next_free and inline_ordered_team_ids fields, change
60         ordered_team_ids into pointer from flexible array member.
61         Add mode field.  Put lock and next into a different cache line
62         from most of the write-once fields.
63         (gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
64         gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
65         gomp_iter_ull_guided_next): New prototypes.
66         (gomp_new_icv): New prototype.
67         (struct gomp_thread): Add thread_pool and task fields.
68         (struct gomp_thread_pool): New type.
69         (gomp_new_team): New prototype.
70         (gomp_team_start): Change type of last argument.
71         (gomp_new_work_share): Removed.
72         (gomp_init_work_share, gomp_fini_work_share): New prototypes.
73         (gomp_work_share_init_done): New static inline.
74         (gomp_throttled_spin_count_var, gomp_available_cpus,
75         gomp_managed_threads): New extern decls.
76         (gomp_init_task): New prototype.
77         (gomp_spin_count_var): New extern var decl.
78         (LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
79         or no alias support, or if not PIC.
80         (gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
81         gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
82         gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
83         gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
84         gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
85         gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
86         gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
87         gomp_test_nest_lock_25): New prototypes.
88         (omp_lock_symver, strong_alias): Define.
89         (gomp_remaining_threads_count, gomp_remaining_threads_lock): New
90         decls.
91         (gomp_end_task): New.
92         (struct gomp_task_icv, gomp_global_icv): New.
93         (gomp_thread_limit_var, gomp_max_active_levels_var): New.
94         (struct gomp_task): New.
95         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
96         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
97         (gomp_icv): New.
98         (gomp_schedule_type): Reorder enum to match
99         omp_sched_t.
100         * team.c (struct gomp_thread_start_data): Add thread_pool and task
101         fields.
102         (gomp_thread_start): Add gomp_team_barrier_wait call.
103         For non-nested case remove clearing of docked thread thr fields.
104         Use pool fields instead of global gomp_* variables.  Use
105         gomp_barrier_wait_last when needed.  Initialize ts.active_level.
106         Create tasks for each member thread.
107         (free_team): Only destroy team barrier, task_lock here and free it.
108         (gomp_free_thread): Free last_team if non-NULL.
109         (gomp_team_end): Call gomp_team_barrier_wait instead of
110         gomp_barrier_wait.  For nested case call one extra
111         gomp_barrier_wait.  Move here some destruction from free_team.
112         Call free_team on pool->last_team if any, rather than freeing
113         current team.  Destroy work_share_list_free_lock ifndef
114         HAVE_SYNC_BUILTINS.
115         (gomp_new_icv): New function.
116         (gomp_threads, gomp_threads_size, gomp_threads_used,
117         gomp_threads_dock): Removed.
118         (gomp_thread_destructor): New variable.
119         (gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
120         functions.
121         (gomp_team_start): Create new pool if current thread doesn't have
122         one.  Use pool fields instead of global gomp_* variables. 
123         Initialize thread_pool field for new threads.  Clear single_count.
124         Change last argument from ws to team, don't create
125         new team, set ts.work_share to &team->work_shares[0] and clear
126         ts.last_work_share.  Don't clear ts.work_share_generation.
127         If number of threads changed, adjust atomically gomp_managed_threads.
128         Use gomp_init_task instead of gomp_new_task,
129         set thr->task to the corresponding implicit_task array entry.
130         Create tasks for each member thread.  Initialize ts.level.
131         (initialize_team): Call pthread_key_create on
132         gomp_thread_destructor.
133         (team_destructor): New function.
134         (new_team): Removed.
135         (gomp_new_team): New function.
136         (free_team): Free gomp_work_share blocks chained through next_alloc,
137         instead of freeing work_shares and destroying work_share_lock.
138         (gomp_team_end): Call gomp_fini_work_share.  If number of threads
139         changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
140         * barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
141         of gomp_barrier_wait.
142         * single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
143         instead of gomp_barrier_wait.  Call gomp_work_share_init_done
144         if gomp_work_share_start returned true.  Don't unlock ws->lock.
145         (GOMP_single_copy_end): Call gomp_team_barrier_wait instead
146         of gomp_barrier_wait.
147         (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
148         gomp_work_share_init_done if gomp_work_share_start returned true.
149         Don't unlock ws->lock.
150         * work.c: Include stddef.h.
151         (free_work_share): Use work_share_list_free_lock instead
152         of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
153         Call gomp_fini_work_share and then either free ws if orphaned, or
154         put it into work_share_list_free list of the current team.
155         (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
156         functions.
157         (gomp_work_share_start, gomp_work_share_end,
158         gomp_work_share_end_nowait): Rewritten.
159         * omp_lib.f90.in Change some tabs to spaces to prevent warnings.
160         (openmp_version): Set to 200805.
161         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
162         omp_sched_guided, omp_sched_auto): New parameters.
163         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
164         omp_set_max_active_levels, omp_get_max_active_levels,
165         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
166         omp_get_active_level): New interfaces.
167         * omp_lib.h.in (openmp_version): Set to 200805.
168         (omp_sched_kind, omp_sched_static, omp_sched_dynamic,
169         omp_sched_guided, omp_sched_auto): New parameters.
170         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
171         omp_set_max_active_levels, omp_get_max_active_levels,
172         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
173         omp_get_active_level): New externals.
174         * loop.c: Include limits.h.
175         (GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
176         GFS_AUTO.
177         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
178         Likewise.  Use gomp_icv.
179         (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
180         ts.static_trip here.
181         (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
182         gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
183         (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
184         gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
185         don't unlock ws->lock, otherwise lock it.
186         (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
187         gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
188         (gomp_parallel_loop_start): Call gomp_new_team instead of
189         gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
190         Adjust gomp_team_start caller.  Pass 0 as second argument to
191         gomp_resolve_num_threads.
192         (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
193         If adding ws->chunk_size nthreads + 1 times after end won't
194         overflow, set ws->mode to 1.
195         * libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
196         GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
197         GOMP_loop_ull_ordered_static_start,
198         GOMP_loop_ull_ordered_dynamic_start,
199         GOMP_loop_ull_ordered_guided_start,
200         GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
201         GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
202         GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
203         GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
204         GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
205         prototypes.
206         * libgomp.map: Export lock routines also @@OMP_2.0.
207         (GOMP_loop_ordered_dynamic_first,
208         GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
209         GOMP_loop_ordered_static_first): Remove.
210         (GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
211         GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
212         GOMP_loop_ull_ordered_dynamic_next,
213         GOMP_loop_ull_ordered_dynamic_start,
214         GOMP_loop_ull_ordered_guided_next,
215         GOMP_loop_ull_ordered_guided_start,
216         GOMP_loop_ull_ordered_runtime_next,
217         GOMP_loop_ull_ordered_runtime_start,
218         GOMP_loop_ull_ordered_static_next,
219         GOMP_loop_ull_ordered_static_start,
220         GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
221         GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
222         GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
223         (omp_set_schedule, omp_get_schedule,
224         omp_get_thread_limit, omp_set_max_active_levels,
225         omp_get_max_active_levels, omp_get_level,
226         omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
227         omp_set_schedule_, omp_set_schedule_8_,
228         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
229         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
230         omp_get_max_active_levels_, omp_get_level_,
231         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
232         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
233         New exports @@OMP_3.0.
234         * omp.h.in (omp_sched_t): New type.
235         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
236         omp_set_max_active_levels, omp_get_max_active_levels,
237         omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
238         omp_get_active_level): New prototypes.
239         * env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
240         gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
241         gomp_thread_limit_var, gomp_remaining_threads_count,
242         gomp_remaining_threads_lock): New variables.
243         (parse_spincount): New function.
244         (initialize_env): Call gomp_init_num_threads unconditionally.
245         Initialize gomp_available_cpus.  Call parse_spincount,
246         initialize gomp_{,throttled_}spin_count_var
247         depending on presence and value of OMP_WAIT_POLICY and
248         GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
249         Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
250         OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
251         for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
252         gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
253         (gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
254         gomp_run_sched_var, gomp_run_sched_chunk): Remove.
255         (gomp_global_icv): New.
256         (parse_schedule): Use it.  Parse "auto".
257         (omp_set_num_threads): Use gomp_icv.
258         (omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
259         Likewise.
260         (omp_get_max_threads): Move from parallel.c.
261         (omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
262         omp_set_max_active_levels, omp_get_max_active_levels): New functions,
263         add ialias.
264         (parse_stacksize, parse_wait_policy): New functions.
265         * fortran.c: Rewrite lock wrappers, if symbol versioning provide
266         both wrappers for compatibility and new locks.
267         (omp_set_schedule, omp_get_schedule,
268         omp_get_thread_limit, omp_set_max_active_levels,
269         omp_get_max_active_levels, omp_get_level,
270         omp_get_ancestor_thread_num, omp_get_team_size,
271         omp_get_active_level): New ialias_redirect.
272         (omp_set_schedule_, omp_set_schedule_8_,
273         omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
274         omp_set_max_active_levels_, omp_set_max_active_levels_8_,
275         omp_get_max_active_levels_, omp_get_level_,
276         omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
277         omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
278         New functions.
279         * parallel.c: Include limits.h.
280         (gomp_resolve_num_threads): Add count argument.  Rewritten.
281         (GOMP_parallel_start): Call gomp_new_team and pass that as last
282         argument to gomp_team_start.  Pass 0 as second argument to
283         gomp_resolve_num_threads.
284         (GOMP_parallel_end): Decrease gomp_remaining_threads_count
285         if gomp_thread_limit_var != ULONG_MAX.
286         (omp_in_parallel): Implement using ts.active_level.
287         (omp_get_max_threads): Move to env.c.
288         (omp_get_level, omp_get_ancestor_thread_num,
289         omp_get_team_size, omp_get_active_level): New functions,
290         add ialias.
291         * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
292         after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
293         gomp_iter_dynamic_next instead of the _locked variant and don't take
294         lock around it, otherwise acquire it before calling
295         gomp_iter_dynamic_next_locked.
296         (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
297         gomp_iter_dynamic_next instead of the _locked variant and don't take
298         lock around it.
299         (GOMP_parallel_sections_start): Call gomp_new_team instead of
300         gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
301         Adjust gomp_team_start caller.  Pass count as second argument to
302         gomp_resolve_num_threads, don't adjust num_threads after the call.
303         Use gomp_icv.
304         * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
305         ws->chunk_size by incr.
306         (gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
307         code.
308         * libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
309         types.
310         (omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
311         (omp_check_defines): Check even the compat defines.
312         * config/linux/ptrlock.c: New file.
313         * config/linux/ptrlock.h: New file.
314         * config/linux/wait.h: New file.
315         * config/posix/ptrlock.c: New file.
316         * config/posix/ptrlock.h: New file.
317         * config/linux/bar.h (gomp_team_barrier_wait,
318         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
319         (gomp_team_barrier_set_task_pending,
320         gomp_team_barrier_clear_task_pending,
321         gomp_team_barrier_set_waiting_for_tasks,
322         gomp_team_barrier_waiting_for_tasks,
323         gomp_team_barrier_done): New inlines.
324         (gomp_barrier_t): Rewritten.
325         (gomp_barrier_state_t): New typedef.
326         (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
327         gomp_barrier_wait_start): Rewritten.
328         (gomp_barrier_wait_end): Change second argument to
329         gomp_barrier_state_t.
330         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
331         inlines.
332         * config/linux/bar.c: Include wait.h instead of libgomp.h and
333         futex.h.
334         (gomp_barrier_wait_end): Rewritten.
335         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
336         gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
337         * config/posix/bar.h (gomp_barrier_t): Add generation field.
338         (gomp_barrier_state_t): New typedef.
339         (gomp_team_barrier_wait,
340         gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
341         (gomp_barrier_wait_start): Or all but low 2 bits from generation
342         into the return value.  Return gomp_barrier_state_t.
343         (gomp_team_barrier_set_task_pending,
344         gomp_team_barrier_clear_task_pending,
345         gomp_team_barrier_set_waiting_for_tasks,
346         gomp_team_barrier_waiting_for_tasks,
347         gomp_team_barrier_done): New inlines.
348         (gomp_barrier_wait_end): Change second argument to
349         gomp_barrier_state_t.
350         (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
351         inlines.
352         * config/posix/bar.c (gomp_barrier_init): Clear generation field.
353         (gomp_barrier_wait_end): Change second argument to
354         gomp_barrier_state_t. 
355         (gomp_team_barrier_wait, gomp_team_barrier_wait_end,
356         gomp_team_barrier_wake): New functions.
357         * config/linux/mutex.c: Include wait.h instead of libgomp.h and
358         futex.h.
359         (gomp_futex_wake, gomp_futex_wait): New variables.
360         (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
361         * config/linux/lock.c: Rewrite to make locks task owned,
362         for backwards compatibility provide the old entrypoints
363         if symbol versioning.  Include wait.h instead of libgomp.h and
364         futex.h.
365         (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
366         * config/posix95/lock.c: Rewrite to make locks task owned,
367         for backwards compatibility provide the old entrypoints
368         if symbol versioning.
369         * config/posix/lock.c: Rewrite to make locks task owned,
370         for backwards compatibility provide the old entrypoints
371         if symbol versioning.
372         * config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
373         (get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
374         * config/posix/proc.c, config/mingw32/proc.c: Similarly.
375         * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
376         (sys_futex0): Return error code.
377         (futex_wake, futex_wait): If ENOSYS was returned, clear
378         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
379         (cpu_relax, atomic_write_barrier): New static inlines.
380         * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
381         (futex_wake, futex_wait): If ENOSYS was returned, clear
382         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
383         (cpu_relax, atomic_write_barrier): New static inlines.
384         * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
385         (sys_futex0): Return error code.
386         (futex_wake, futex_wait): If ENOSYS was returned, clear
387         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
388         (cpu_relax, atomic_write_barrier): New static inlines.
389         * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
390         (sys_futex0): Return error code.
391         (futex_wake, futex_wait): If ENOSYS was returned, clear
392         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
393         (cpu_relax, atomic_write_barrier): New static inlines.
394         * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
395         (sys_futex0): Return error code.
396         (futex_wake, futex_wait): If ENOSYS was returned, clear
397         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
398         (cpu_relax, atomic_write_barrier): New static inlines.
399         * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
400         (sys_futex0): Return error code.
401         (futex_wake, futex_wait): If ENOSYS was returned, clear
402         FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
403         (cpu_relax, atomic_write_barrier): New static inlines.
404         * config/linux/sem.c: Include wait.h instead of libgomp.h and
405         futex.h.
406         (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
407         * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
408         * config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
409         types.
410         (omp_nest_lock_t): Change owner into void *, add lock field.
411         * config/posix95/omp-lock.h: Include semaphore.h.
412         (omp_lock_25_t, omp_nest_lock_25_t): New types.
413         (omp_lock_t): Use sem_t instead of mutex if semaphores
414         aren't broken.
415         (omp_nest_lock_t): Likewise.  Change owner to void *.
416         * config/posix/omp-lock.h: Include semaphore.h.
417         (omp_lock_25_t, omp_nest_lock_25_t): New types.
418         (omp_lock_t): Use sem_t instead of mutex if semaphores
419         aren't broken.
420         (omp_nest_lock_t): Likewise.  Add owner field.
421
422 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
423
424         * testsuite/libgomp.c/collapse-1.c: New test.
425         * testsuite/libgomp.c/collapse-2.c: New test.
426         * testsuite/libgomp.c/collapse-3.c: New test.
427         * testsuite/libgomp.c/icv-1.c: New test.
428         * testsuite/libgomp.c/icv-2.c: New test.
429         * testsuite/libgomp.c/lib-2.c: New test.
430         * testsuite/libgomp.c/lock-1.c: New test.
431         * testsuite/libgomp.c/lock-2.c: New test.
432         * testsuite/libgomp.c/lock-3.c: New test.
433         * testsuite/libgomp.c/loop-4.c: New test.
434         * testsuite/libgomp.c/loop-5.c: New test.
435         * testsuite/libgomp.c/loop-6.c: New test.
436         * testsuite/libgomp.c/loop-7.c: New test.
437         * testsuite/libgomp.c/loop-8.c: New test.
438         * testsuite/libgomp.c/loop-9.c: New test.
439         * testsuite/libgomp.c/nested-3.c: New test.
440         * testsuite/libgomp.c/nestedfn-6.c: New test.
441         * testsuite/libgomp.c/sort-1.c: New test.
442         * testsuite/libgomp.c/task-1.c: New test.
443         * testsuite/libgomp.c/task-2.c: New test.
444         * testsuite/libgomp.c/task-3.c: New test.
445         * testsuite/libgomp.c/task-4.c: New test.
446         * testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
447         to C++ testsuite default compiler options.
448         * testsuite/libgomp.c++/collapse-1.C: New test.
449         * testsuite/libgomp.c++/collapse-2.C: New test.
450         * testsuite/libgomp.c++/ctor-10.C: New test.
451         * testsuite/libgomp.c++/for-1.C: New test.
452         * testsuite/libgomp.c++/for-2.C: New test.
453         * testsuite/libgomp.c++/for-3.C: New test.
454         * testsuite/libgomp.c++/for-4.C: New test.
455         * testsuite/libgomp.c++/for-5.C: New test.
456         * testsuite/libgomp.c++/loop-8.C: New test.
457         * testsuite/libgomp.c++/loop-9.C: New test.
458         * testsuite/libgomp.c++/loop-10.C: New test.
459         * testsuite/libgomp.c++/task-1.C: New test.
460         * testsuite/libgomp.c++/task-2.C: New test.
461         * testsuite/libgomp.c++/task-3.C: New test.
462         * testsuite/libgomp.c++/task-4.C: New test.
463         * testsuite/libgomp.c++/task-5.C: New test.
464         * testsuite/libgomp.c++/task-6.C: New test.
465         * testsuite/libgomp.fortran/allocatable1.f90: New test.
466         * testsuite/libgomp.fortran/allocatable2.f90: New test.
467         * testsuite/libgomp.fortran/allocatable3.f90: New test.
468         * testsuite/libgomp.fortran/allocatable4.f90: New test.
469         * testsuite/libgomp.fortran/collapse1.f90: New test.
470         * testsuite/libgomp.fortran/collapse2.f90: New test.
471         * testsuite/libgomp.fortran/collapse3.f90: New test.
472         * testsuite/libgomp.fortran/collapse4.f90: New test.
473         * testsuite/libgomp.fortran/lastprivate1.f90: New test.
474         * testsuite/libgomp.fortran/lastprivate2.f90: New test.
475         * testsuite/libgomp.fortran/lib4.f90: New test.
476         * testsuite/libgomp.fortran/lock-1.f90: New test.
477         * testsuite/libgomp.fortran/lock-2.f90: New test.
478         * testsuite/libgomp.fortran/nested1.f90: New test.
479         * testsuite/libgomp.fortran/nestedfn4.f90: New test.
480         * testsuite/libgomp.fortran/strassen.f90: New test.
481         * testsuite/libgomp.fortran/tabs1.f90: New test.
482         * testsuite/libgomp.fortran/tabs2.f: New test.
483         * testsuite/libgomp.fortran/task1.f90: New test.
484         * testsuite/libgomp.fortran/task2.f90: New test.
485         * testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
486         * testsuite/libgomp.fortran/vla5.f90: Likewise.
487         * testsuite/libgomp.c/pr26943-2.c: Likewise.
488         * testsuite/libgomp.c/pr26943-3.c: Likewise.
489         * testsuite/libgomp.c/pr26943-4.c: Likewise.
490
491 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
492
493         PR c++/36308
494         * testsuite/libgomp.c++/ctor-11.C: New test.
495         * testsuite/libgomp.c++/ctor-12.C: New test.
496
497 2008-05-15  Janis Johnson  <janis187@us.ibm.com>
498
499         * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib.
500
501 2008-05-07  Jakub Jelinek  <jakub@redhat.com>
502
503         PR middle-end/36106
504         * testsuite/libgomp.c/atomic-5.c: New test.
505         * testsuite/libgomp.c/atomic-6.c: New test.
506         * testsuite/libgomp.c/autopar-1.c: New test.
507
508 2008-04-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
509
510         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS)
511         (LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY)
512         (LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT)
513         (LIBGOMP_CHECK_ATTRIBUTE_ALIAS): Fix cache variable names.
514         * configure: Regenerate.
515         * Makefile.in, testsuite/Makefile.in: Likewise.
516
517 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
518
519         PR bootstrap/35457
520         * aclocal.m4: Regenerate.
521         * configure: Regenerate.
522
523 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
524
525         PR middle-end/35611
526         * testsuite/libgomp.c/atomic-4.c: New test.
527
528         PR libgomp/35625
529         * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
530         (gomp_iter_guided_next): Likewise.
531         * testsuite/libgomp.c/pr35625.c: New test.
532
533 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
534
535         * aclocal.m4: Regenerate.
536         * configure: Likewise.
537         * Makefile.in: Likewise.
538         * testsuite/Makefile.in: Likewise.
539
540 2008-03-13  Jakub Jelinek  <jakub@redhat.com>
541
542         PR middle-end/35185
543         * testsuite/libgomp.c++/pr35185.C: New test.
544
545 2008-03-12  Jakub Jelinek  <jakub@redhat.com>
546
547         PR middle-end/35549
548         * testsuite/libgomp.c/pr35549.c: New test.
549
550 2008-03-06  Jakub Jelinek  <jakub@redhat.com>
551
552         * testsuite/libgomp.c/atomic-3.c: New test.
553
554 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
555
556         PR fortran/33197
557         * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
558         .F08 file suffixes.
559
560 2008-03-03  Peter O'Gorman  <pogma@thewrittenword.com>
561
562         PR libgomp/33131
563         * configure.ac: Add ACX_HEADER_STRING.
564         * env.c: Include strings.h.
565         * aclocal.m4: Regenerate.
566         * config.h.in: Regenerate.
567         * configure: Regenerate.
568         * Makefile.in: Regenerate.
569         * testsuite/Makefile.in: Regenerate.
570
571 2008-02-15  Jakub Jelinek  <jakub@redhat.com>
572
573         PR middle-end/35196
574         * testsuite/libgomp.c/pr35196.c: New test.
575
576         PR middle-end/35130
577         * testsuite/libgomp.fortran/pr35130.f90: New test.
578         * testsuite/libgomp.c/pr35130.c: New test.
579
580 2008-01-25  Jakub Jelinek  <jakub@redhat.com>
581
582         PR middle-end/33880
583         * testsuite/libgomp.c/pr33880.c: New test.
584         * testsuite/libgomp.fortran/pr33880.f90: New test.
585
586 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
587
588         * configure: Regenerate.
589
590 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
591
592         * configure.ac: Move futex checking into ../config/futex.m4.
593         * configure: Rebuilt.
594         * aclocal.m4: Rebuilt.
595         * Makefile.in: Rebuilt.
596
597         * configure.tgt: Rename have_tls to gcc_cv_have_tls to match
598         2007-10-15 ../config/tls.m4 change.
599
600 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
601
602         PR c++/34513
603         * testsuite/libgomp.c/pr34513.c: New test.
604         * testsuite/libgomp.c++/pr34513.C: New test.
605
606 2007-12-17  Jack Howarth  <howarth@bromo.med.uc.edu>
607
608         PR target/32765
609         * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
610
611 2007-12-04  Jakub Jelinek  <jakub@redhat.com>
612
613         * omp.h.in (__GOMP_NOTHROW): Define.  Use it on omp_* prototypes.
614
615 2007-12-03  Jakub Jelinek  <jakub@redhat.com>
616
617         * testsuite/libgomp.c/private-1.c: New test.
618
619 2007-11-29  Andris Pavenis <andris.pavenis@iki.fi>
620             Paolo Bonzini  <bonzini@gnu.org>
621
622         * Makefile.am: Use space as vpath separator.  Use 'vpath %'
623         instead of 'VPATH ='.
624         * Makefile.in: Regenerate.
625
626 2007-11-23  Matthias Klose  <doko@ubuntu.com>
627
628         * configure.ac: Adjust makeinfo version check.
629         * configure: Regenerate.
630
631 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
632
633         PR fortran/34020
634         * testsuite/libgomp.fortran/pr34020.f90: New test.
635
636 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
637
638         PR c++/33894
639         * testsuite/libgomp.c++/atomic-1.C: New test.
640
641 2007-10-25  Jakub Jelinek  <jakub@redhat.com>
642
643         PR libgomp/33275
644         * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
645         Make x and y integers rather than (implicit) reals.  Add private (j)
646         clause to the last omp parallel.
647
648 2007-10-15  Maciej W. Rozycki  <macro@linux-mips.org>
649
650         * configure: Regenerate following changes to ../config/tls.m4.
651
652 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
653
654         * testsuite/libgomp.fortran/stack.f90: New test.
655
656 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
657
658         * config/mingw32/proc.c: New file.
659
660 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
661
662         * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
663         (main): Use __get_cpuid to get i386 target fetaures.
664         * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
665         (main): Use __get_cpuid to get x86_64 target fetaures.
666
667 2007-08-15  Jack Howarth  <howarth@bromo.med.uc.edu>
668
669         PR target/32765
670         * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
671         * testsuite/libgomp.fortran/crayptr2.f90: Likwise.
672
673 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
674
675         PR fortran/32550
676         * testsuite/libgomp.fortran/pr32550.f90: New test.
677         * testsuite/libgomp.fortran/crayptr2.f90: New test.
678
679 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
680
681         * aclocal.m4: Regenerated.
682
683 2007-07-05  Tobias Burnus  <burnus@net-b.de>
684
685         PR fortran/32359
686         * testsuite/libgomp.fortran/pr32359.f90: New.
687
688 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
689
690         PR libgomp/32468
691         * sections.c (GOMP_parallel_sections_start): Only decrease
692         number of threads to COUNT if dyn_var is true.
693         * testsuite/libgomp.c/pr32468.c: New test.
694
695 2007-07-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
696
697         PR libgomp/26308
698         * config/posix/lock.c (_XOPEN_SOURCE): Don't define on Tru64 UNIX.
699
700 2007-06-21  Jakub Jelinek  <jakub@redhat.com>
701
702         PR middle-end/32362
703         * testsuite/libgomp.c/pr32362-1.c: New test.
704         * testsuite/libgomp.c/pr32362-2.c: New test.
705         * testsuite/libgomp.c/pr32362-3.c: New test.
706
707 2007-06-07  Jakub Jelinek  <jakub@redhat.com>
708
709         * team.c (gomp_team_start): Fix setting up thread_attr
710         stack size.
711
712 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
713
714         * configure: Regenerate.
715
716 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
717
718         * Makefile.in: Regenerate.
719         * configure: Regenerate.
720         * aclocal.m4: Regenerate.
721         * testsuite/Makefile.in: Regenerate.
722
723 2007-05-04  Jakub Jelinek  <jakub@redhat.com>
724
725         * config/linux/proc.c: New file.
726
727         PR libgomp/28482
728         * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
729
730 2007-04-19  Daniel Franke  <franke.daniel@gmail.com>
731
732         * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
733
734 2007-04-16  Matthias Klose  <doko@debian.org>
735
736         * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
737         flags if not building with -m64.
738         * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
739         flag for i?86-*-* targets, if current target matches -m64.
740
741 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
742
743         * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
744         * Makefile.in: Regenerate.
745
746 2007-04-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
747
748         PR testsuite/31369
749         * testsuite/libgomp.c++/c++.exp: Don't use concat when setting
750         ld_library_path.
751         * testsuite/libgomp.fortran/fortran.exp: Likewise.
752
753 2007-04-04  Jakub Jelinek  <jakub@redhat.com>
754
755         * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
756         decls.
757         (gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
758         * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
759         (parse_affinity): New function.
760         (initialize_env): Call it and gomp_init_affinity.
761         * team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
762         create new pthread_attr_t and call gomp_init_thread_affinity
763         on it for each thread before passing the attribute to pthread_create.
764         * config/linux/affinity.c: New file.
765         * config/posix/affinity.c: New file.
766         * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
767         * configure: Rebuilt.
768         * config.h.in: Rebuilt.
769         * Makefile.am (libgomp_la_SOURCES): Add affinity.c.
770         * Makefile.in: Rebuilt.
771
772 2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>
773
774         * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
775         *-*-darwin*.
776         * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
777         and use it if found.
778
779 2007-03-18  Uros Bizjak  <ubizjak@gmail.com>
780
781         * testsuite/config/default.exp: New file.
782         * testsuite/lib/libgomp.exp: New file.
783         * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
784         libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
785         load_lib *, load_gcc_lib *): Move to libgomp.exp.
786         (libgomp_load): Remove.
787         * testsuite/lib/libgomp.exp (libgomp_init): Compute
788         always_ld_library_path, not ld_library_path.  Set additional_flags
789         to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
790         (target_compile): Do not call libgomp_init.  Append lang_library_path
791         and lang_link_flags to options.
792         * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.  Set
793         ld_library_path from always_ld_library_path.  Set LD_LIBRARY_PATH
794         here.
795         * testsuite/libgomp.c++/c++.exp: Set ld_library_path from
796         always_ld_library_path.  Set LD_LIBRARY_PATH here.
797         * testsuite/libgomp.fortran/fortran.exp: Ditto.
798         * testsuite/libgomp.c/atomic-1.c: Set dg-options to
799         "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
800         CX8 flag.
801         * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
802         lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
803         * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
804         * testsuite/libgomp.c/pr29947-1.c: Ditto.
805         * testsuite/libgomp.c/atomic-10.c: Ditto.
806
807 2007-03-21  Jakub Jelinek  <jakub@redhat.com>
808
809         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
810         dg-final cleanup-modules line.
811         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
812         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
813         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
814         * testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
815         * testsuite/libgomp.fortran/reduction5.f90: Likewise.
816         * testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
817         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
818
819 2007-03-18  Andreas Schwab  <schwab@suse.de>
820
821         * acinclude.m4: Adjust regular expression for ld version
822         extraction.
823         * configure: Regenerate.
824
825 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
826
827         * Makefile.am: Add install-pdf target as copied from
828         automake v1.10 rules.
829         * Makefile.in: Regenerate
830
831 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
832
833         PR libgomp/28486
834         * configure: Regenerate.
835
836         PR c++/30703
837         * testsuite/libgomp.c++/pr30703.C: New test.
838
839 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
840
841         Revert:
842         2006-07-05  Eric Christopher  <echristo@apple.com>
843         * configure.ac: Depend addition of -pthread on host OS.
844         * configure: Regenerate.
845
846 2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
847
848         * libgomp.texi: Fix spacing after abbreviations.
849
850 2007-01-31  Daniel Franke <franke.daniel@gmail.com>
851
852         PR libgomp/30546
853         * configure.ac: Add check for makeinfo
854         * Makefile.am: Redefined target libgomp.info, build libgomp.info only
855         if an appropiate version of makeinfo is found.
856         * aclocal.m4: Regenerated.
857         * configure: Regenerated.
858         * Makefile.in: Regenerated.
859         * testsuite/Makefile.in: Regenerated.
860
861 2007-01-29  Daniel Franke <franke.daniel@gmail.com>
862
863         PR libgomp/30540
864         * libgomp.texi: More about implementation-dependent settings.
865
866 2007-01-26  Tobias Burnus  <burnus@net-b.de>
867
868         * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
869
870 2007-01-24  Jakub Jelinek  <jakub@redhat.com>
871
872         PR middle-end/30494
873         * testsuite/libgomp.c/pr30494.c: New test.
874
875 2007-01-15  Tom Tromey  <tromey@redhat.com>
876
877         * configure: Rebuilt.
878         * configure.ac: Fixed comment.
879
880 2007-01-14  Daniel Franke  <franke.daniel@gmail.com>
881
882         * libgomp.texi: Document implementation specific default values of
883         environment variables.
884
885 2006-12-21  Daniel Franke  <franke.daniel@gmail.com>
886
887         PR libgomp/28209
888         * libgomp.texi: New file.
889         * configure.ac: Add --enable-generated-files-in-srcdir option.
890         * Makefile.am: Add info, dvi, pdf, html targets. On request, copy
891         files to srcdir.
892         * Makefile.in: Regenerated.
893         * config.h.in: Regenerated.
894         * testsuite/Makefile.in: Regenerated.
895         * NOTES: Removed.
896
897 2006-12-04  Daniel Franke  <franke.daniel@gmail.com>
898
899         PR libgomp/29949
900         * env.c (omp_set_num_threads): Set illegal thread count to 1.
901
902 2006-12-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
903
904         * configure: Regenerate.
905
906 2006-12-04  Jakub Jelinek  <jakub@redhat.com>
907
908         PR libgomp/29947
909         * loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
910         start if there shouldn't be any loop iterations.
911         (gomp_loop_ordered_static_start): Remove start == end test.
912         * testsuite/libgomp.c/pr29947-1.c: New test.
913         * testsuite/libgomp.c/pr29947-2.c: New test.
914
915 2006-12-02  Eric Botcazou  <ebotcazou@libertysurf.fr>
916
917         * configure.tgt: Force initial-exec TLS model on Linux only.
918
919 2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
920
921         * configure: Regenerated.
922
923 2006-11-09  Uros Bizjak  <ubizjak@gmail.com>
924
925         * env.c (parse_schedule): Reject out of range values.
926         (parse_unsigned_long): Reject out of range, negative or zero values.
927
928 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
929
930         PR fortran/29629
931         * testsuite/libgomp.fortran/pr29629.f90: New test.
932
933 2006-10-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
934
935         PR libgomp/29494
936         * configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
937         * config/posix95: New directory.
938         * config/posix95/omp-lock.h: New file.
939         * config/posix95/lock.c: Likewise.
940
941 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
942
943         * aclocal.m4: Regenerate.
944         * configure: Regenerate.
945
946 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
947
948         * testsuite/libgomp.c/barrier-1.c: Change timestamp tests from
949         '<' to '<='.
950
951 2006-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
952
953         * acinclude.m4 (HAVE_ATTRIBUTE_ALIAS): Remove __USER_LABEL_PREFIX__ from
954         test.
955         * configure: Regenerate.
956         * fortran.c  (ialias_redirect): Add __USER_LABEL_PREFIX__ to alias.
957
958 2006-09-26  Jakub Jelinek  <jakub@redhat.com>
959
960         PR middle-end/25261
961         PR middle-end/28790
962         * testsuite/libgomp.c/nestedfn-4.c: New test.
963         * testsuite/libgomp.c/nestedfn-5.c: New test.
964         * testsuite/libgomp.fortran/nestedfn3.f90: New test.
965
966         PR fortran/29097
967         * testsuite/libgomp.fortran/condinc1.f: New test.
968         * testsuite/libgomp.fortran/condinc2.f: New test.
969         * testsuite/libgomp.fortran/condinc3.f90: New test.
970         * testsuite/libgomp.fortran/condinc4.f90: New test.
971         * testsuite/libgomp.fortran/condinc1.inc: New file.
972
973 2006-09-18  Tom Tromey  <tromey@redhat.com>
974
975         * configure: Rebuilt.
976
977 2006-09-13  Joseph S. Myers  <joseph@codesourcery.com>
978
979         PR c/28768
980         PR preprocessor/14634
981         * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
982         to AC_DEFINE.
983         * configure: Regenerate.
984
985 2006-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
986
987         * testsuite/libgomp.fortran/reduction3.f90: Change
988         -2147483648 to -huge(i)-1 to avoid overflow.
989         * testsuite/libgomp.fortran/reduction4.f90: Change
990         Z'ffffffff' to not(0) to avoid overflow.
991
992 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
993
994         PR libgomp/25938
995         * Makefile.am (libsubincludedir): New.
996         (nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
997         * Makefile.in: Regenerate.
998
999 2006-08-17  Jakub Jelinek  <jakub@redhat.com>
1000
1001         PR libgomp/28725
1002         * env.c: Include ctype.h.
1003         (parse_schedule, parse_unsigned_long, parse_boolean): Allow
1004         leading and/or trailing whitespace and compare strings case
1005         insensitively.
1006
1007 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
1008
1009         PR fortran/28390
1010         * testsuite/libgomp.fortran/pr28390.f: New test.
1011
1012 2006-07-05  Eric Christopher  <echristo@apple.com>
1013
1014         * configure.ac: Depend addition of -pthread on host OS.
1015         * configure: Regenerate.
1016
1017 2006-06-21  Jakub Jelinek  <jakub@redhat.com>
1018
1019         * critical.c (GOMP_critical_name_start): Fix *pptr initialization
1020         when gomp_mutex_t is larger than pointer and HAVE_SYNC_BUILTINS is
1021         defined.
1022
1023 2006-06-20  Jakub Jelinek  <jakub@redhat.com>
1024
1025         PR libgomp/26175
1026         PR libgomp/26477
1027         * configure.ac: If neither --enable-linux-futex nor
1028         --disable-linux-futex is passed, determine the default by checking
1029         for compiling and/or running against NPTL.  With --enable-linux-futex,
1030         check if SYS_gettid and SYS_futex are defined.
1031         * configure: Rebuilt.
1032
1033 2006-06-14  Richard Henderson  <rth@redhat.com>
1034
1035         PR libgomp/28008
1036         * env.c (initialize_env): Avoid using PTHREAD_STACK_MIN when
1037         undefined.  Use GOMP_STACKSIZE not OMP_STACKSIZE for environment.
1038
1039 2006-06-09  Richard Henderson  <rth@redhat.com>
1040
1041         * env.c (gomp_nthreads_var): Change to unsigned long.
1042         (gomp_run_sched_chunk): Likewise.
1043         (parse_unsigned_long): Rename from parse_num_threads and generalize.
1044         (initialize_env): Initialize gomp_thread_attr.
1045         * libgomp.h (gomp_nthreads_var): Update decl.
1046         (gomp_run_sched_chunk): Likewise.
1047         (gomp_thread_attr): Declare.
1048         * team.c (gomp_thread_attr): Export.
1049         (initialize_team): Don't initialize it.
1050
1051 2006-06-09  Jakub Jelinek  <jakub@redhat.com>
1052
1053         PR fortran/27916
1054         * testsuite/libgomp.fortran/pr27916-1.f90: New test.
1055         * testsuite/libgomp.fortran/pr27916-2.f90: New test.
1056
1057 2006-06-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1058
1059         * config/mingw32/time.c: New file.
1060         * configure.tgt: Use it.
1061
1062 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
1063
1064         * Makefile.am: Add install-html target. Add install-html to .PHONY
1065         * Makefile.in: Regenerate.
1066
1067 2006-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1068
1069         PR libgomp/27612
1070         * testsuite/libgomp.c/sections-1.c: Require sync_int_long.
1071         * testsuite/libgomp.c/critical-1.c: Likewise.
1072         * testsuite/libgomp.c/loop-1.c: Likewise.
1073         * testsuite/libgomp.c/loop-2.c: Likewise.
1074         * testsuite/libgomp.c/single-1.c: Likewise.
1075         * testsuite/libgomp.c/ordered-1.c: Likewise.
1076         * testsuite/libgomp.c/ordered-2.c: Likewise.
1077
1078 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
1079
1080         PR middle-end/27416
1081         * libgomp.fortran/pr27416-1.f90: New test.
1082
1083 2006-05-03  Jakub Jelinek  <jakub@redhat.com>
1084
1085         PR fortran/27395
1086         * testsuite/libgomp.fortran/pr27395-1.f90: New test.
1087         * testsuite/libgomp.fortran/pr27395-2.f90: New test.
1088
1089 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
1090
1091         PR c++/26943
1092         * testsuite/libgomp.c/pr26943-1.c: New test.
1093         * testsuite/libgomp.c/pr26943-2.c: New test.
1094         * testsuite/libgomp.c/pr26943-3.c: New test.
1095         * testsuite/libgomp.c/pr26943-4.c: New test.
1096         * testsuite/libgomp.c++/pr27337.C: Remove barrier.
1097         * testsuite/libgomp.c++/pr26943.C: New test.
1098
1099 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
1100
1101         PR middle-end/27337
1102         * testsuite/libgomp.c++/pr27337.C: New test.
1103
1104 2006-04-26  Jakub Jelinek  <jakub@redhat.com>
1105
1106         PR c/26171
1107         * testsuite/libgomp.c/pr26171.c: New test.
1108
1109 2006-04-25  Richard Henderson  <rth@redhat.com>
1110
1111         PR libgomp/25865
1112         * configure.ac: Use GCC_CHECK_TLS.
1113         * acinclude.m4 (LIBGOMP_CHECK_TLS): Remove.
1114         * Makefile.in, aclocal.m4, configure: Regenerate.
1115
1116 2006-04-10  Matthias Klose  <doko@debian.org>
1117
1118         * testsuite/lib/libgomp.exp (libgomp_init): Recognize multilib
1119         directory names containing underscores.
1120
1121 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
1122
1123         PR c++/26691
1124         * testsuite/libgomp.c++/pr26691.C: New test.
1125
1126 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
1127
1128         * testsuite/libgomp.fortran/retval2.f90: New test.
1129
1130 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
1131
1132         * testsuite/libgomp.c++: New directory.
1133
1134 2006-02-25  Shantonu Sen  <ssen@opendarwin.org>
1135
1136         * config/posix/sem.h: Define BROKEN_POSIX_SEMAPHORES functions.
1137         * config/posix/sem.c: Implement the above.
1138
1139 2006-02-25  Andreas Tobler  <a.tobler@schweiz.ch>
1140
1141         * configure.ac (HAVE_BROKEN_POSIX_SEMAPHORES): Check for darwin and
1142         define HAVE_BROKEN_POSIX_SEMAPHORES.
1143         * configure: Rebuilt.
1144         * config.h.in: Rebuilt.
1145
1146 2006-02-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1147
1148         PR bootstrap/26161
1149         * configure.ac: Remove AC_CHECK_HEADER for pthread.h. Add comment
1150         for the other pthread check.
1151         * configure: Regenerate.
1152         * config.h.in: Regenerate.
1153
1154 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
1155
1156         PR libgomp/25938
1157         PR libgomp/25984
1158         * Makefile.am (fincludedir): New variable.
1159         (nodist_include_HEADERS): Remove Fortran files.
1160         (nodist_finclude_HEADERS): New variable.
1161         * Makefile.in: Regenerated.
1162
1163 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
1164
1165         * testsuite/libgomp.fortran/vla7.f90: Add -w to options.
1166         Remove tests for returning assumed character length arrays.
1167
1168 2006-02-12  Roger Sayle  <roger@eyesopen.com>
1169             John David Anglin  <dave@hiauly1.hia.nrc.ca>
1170
1171         PR libgomp/25936
1172         * configure.tgt: Link against -lrt for sem_init on HPUX v11 systems.
1173
1174 2006-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
1175
1176         * testsuite/lib/libgomp-dg.exp: Load scanrtl.exp library.
1177
1178 2006-02-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
1179
1180         * testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib related
1181         part of LD_LIBRARY_PATH manually.
1182
1183 2006-02-03  H.J. Lu  <hongjiu.lu@intel.com>
1184
1185         PR libgomp/25852
1186         * testsuite/lib/libgomp-dg.exp (blddir): Set it in
1187         libgomp_init.
1188
1189 2005-01-25  Paolo Bonzini  <bonzini@gnu.org>
1190
1191         PR libgomp/25884
1192         * Makefile.am (omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Remove.
1193         * configure.ac (PERL): Don't set.
1194         (gstdint.h, omp.h, omp_lib.h, omp_lib.f90, libgomp_f.h): Create here.
1195         (OMP_LOCK_SIZE, OMP_LOCK_ALIGN, OMP_LOCK_KIND, OMP_NEST_LOCK_SIZE,
1196         OMP_NEST_LOCK_ALIGN, OMP_NEST_LOCK_KIND): New substitutions.
1197         * omp.h.in: Wrap the new configure substitutions with @ characters.
1198         * omp_lib.h.in, omp_lib.f90.in, libgomp_f.h.in: Likewise.
1199         * aclocal.m4, configure, Makefile.in: Regenerate.
1200         * mkomp_h.pl: Delete.
1201
1202 2005-01-24  Paolo Bonzini  <bonzini@gnu.org>
1203
1204         PR libgomp/25259
1205         * configure.ac: Use GCC_HEADER_STDINT.
1206         * libgomp.h: Include gstdint.h.
1207         * libgomp_f.h.in: Don't include stdint.h or inttypes.h.
1208         * configure, Makefile.in, testsuite/Makefile.in, aclocal.m4: Rebuild.
1209
1210 2006-01-24  Richard Henderson  <rth@redhat.com>
1211
1212         PR libgomp/25942
1213         * configure.ac: Add AM_MAINTAINER_MODE.
1214         * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Rebuild.
1215
1216 2006-01-24  Diego Novillo  <dnovillo@redhat.com>
1217
1218         * Makefile.in: Regenerate.
1219         * testsuite/Makefile.in: Regenerate.
1220         * aclocal.m4: Regenerate.
1221
1222 2006-01-23  Andreas Tobler  <a.tobler@schweiz.ch>
1223
1224         * config/posix/proc.c: Conditional include of sys/loadavg.h for
1225         Solaris.
1226         * configure.ac: Add check for loadavg.h.
1227         (link_gomp): Adjust comment.
1228         * configure: Regenerate.
1229         * config.h.in: Regenerate.
1230
1231 2006-01-21  Steve Ellcey  <sje@cup.hp.com>
1232
1233         PR libgomp/25877
1234         * configure.ac: Remove check for alloca.h.
1235         * configure: Regenerate.
1236         * config.h.in: Regenerate.
1237         * libgomp.h: define gomp_alloca to be __builtin_alloca.
1238         * team.c: Remove use of alloca.h.
1239         Call gomp_alloca instead of alloca.
1240
1241 2006-01-20  Steve Ellcey  <sje@cup.hp.com>
1242
1243         PR libgomp/25877
1244         * team.c: Add include of alloca.h.
1245         * configure.ac: Add check for alloca.h.
1246         * configure: Regenerate.
1247         * config.h.in: Regenerate.
1248
1249 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
1250
1251         PR fortran/25219
1252         * testsuite/libgomp.fortran/pr25219.f90: New test.
1253
1254 2005-12-05  Uros Bizjak  <uros@kss-loka.si>
1255
1256         * testsuite/libgomp.c/pr24455.c, testsuite/libgomp.c/copyin-1.c,
1257         testsuite/libgomp.c/copyin-2.c, testsuite/libgomp.c/copyin-3.c,
1258         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
1259         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
1260         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455.C,
1261         testsuite/libgomp.fortran/threadprivate1.f90,
1262         testsuite/libgomp.fortran/threadprivate2.f90,
1263         testsuite/libgomp.fortran/threadprivate3.f90,
1264         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
1265         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
1266         testsuite/libgomp.fortran/omp_parse3.f90: Change required
1267         effective-target to TLS runtime.
1268
1269         * testsuite/libgomp.fortran/pr25162.f: Require
1270         effective-target TLS runtime.
1271
1272 2005-12-01  Jakub Jelinek  <jakub@redhat.com>
1273
1274         * testsuite/libgomp.fortran/nestedfn2.f90: New test.
1275         * testsuite/libgomp.c/nestedfn-3.c: New test.
1276
1277 2005-11-30  Jakub Jelinek  <jakub@redhat.com>
1278
1279         PR fortran/25162
1280         * testsuite/libgomp.fortran/pr25162.f: New test.
1281
1282 2005-11-28  Jakub Jelinek  <jakub@redhat.com>
1283
1284         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Fall back to
1285         CLOCK_REALTIME if clock_* (CLOCK_MONOTONIC, &ts) call failed.
1286
1287 2005-11-25  Jakub Jelinek  <jakub@redhat.com>
1288
1289         * alloc.c, barrier.c, critical.c, env.c, error.c, fortran.c, iter.c,
1290         libgomp.h, libgomp_f.h.in, libgomp_g.h, loop.c, mkomp_h.pl, omp.h.in,
1291         omp_lib.f90.in, omp_lib.h.in, ordered.c, parallel.c, sections.c,
1292         single.c, team.c, work.c, config/linux/alpha/futex.h,
1293         config/linux/bar.c, config/linux/bar.h, config/linux/ia64/futex.h,
1294         config/linux/lock.c, config/linux/mutex.c, config/linux/mutex.h,
1295         config/linux/powerpc/futex.h, config/linux/s390/futex.h,
1296         config/linux/sem.c, config/linux/sem.h, config/linux/sparc/futex.h,
1297         config/linux/x86/futex.h, config/posix/bar.c, config/posix/bar.h,
1298         config/posix/lock.c, config/posix/mutex.h, config/posix/proc.c,
1299         config/posix/sem.c, config/posix/sem.h, config/posix/time.c: Update
1300         FSF address.
1301
1302 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
1303
1304         * Makefile.am: Move libgomp_f.h from nodist_include_HEADERS
1305         to nodist_noinst_HEADERS.
1306         * Makefile.in: Rebuilt.
1307
1308         * config/posix/omp-lock.h (omp_nest_lock_t): Change into struct,
1309         add integer count field.
1310         * config/posix/lock.c (omp_destroy_nest_lock): Adjust for
1311         omp_nest_lock_t type change.
1312         (omp_init_nest_lock): Likewise.  Initialize count to 0.
1313         (omp_set_nest_lock): Adjust for omp_nest_lock_t type change.
1314         Increment count.
1315         (omp_unset_nest_lock): Adjust for omp_nest_lock_t type change.
1316         Decrement count.
1317         (omp_test_nest_lock): Adjust for omp_nest_lock_t type change.
1318         Increment count if successful and return the new nesting level.
1319         * config/linux/lock.c (omp_test_nest_lock): Return new nesting level.
1320         * omp_lib.f90.in (omp_test_lock): Fix LOCK argument type.
1321         * testsuite/libgomp.c/lib-1.c: New test.
1322         * testsuite/libgomp.fortran/lib1.f90: New test.
1323         * testsuite/libgomp.fortran/lib2.f: New test.
1324         * testsuite/libgomp.fortran/lib3.f: New test.
1325
1326 2005-11-17  Richard Henderson  <rth@redhat.com>
1327
1328         PR 24845
1329         * Makefile.am (nodist_toolexeclib_HEADERS): New.
1330         * configure.ac (link_gomp): New.  Substitute it.
1331         (AC_CONFIG_FILES): Add libgomp.spec.
1332         * libgomp.spec.in: New file.
1333         * Makefile.in, testsuite/Makefile.in, configure: Rebuild.
1334         * testsuite/lib/libgomp-dg.exp: Add -B${blddir}/ to flags.
1335
1336 2005-11-18  Jakub Jelinek  <jakub@redhat.com>
1337
1338         * testsuite/libgomp.fortran/reduction1.f90: Adjust for
1339         reduction(-:var) behaving the same as reduction(+:var).
1340         * testsuite/libgomp.c/reduction-4.c: New test.
1341
1342 2005-11-15  Uros Bizjak  <uros@kss-loka.si>
1343
1344         * testsuite/libgomp.c/pr24455-1.c, testsuite/libgomp.c/pr24455.c,
1345         testsuite/libgomp.c/copyin-1.c, testsuite/libgomp.c/copyin-2.c,
1346         testsuite/libgomp.c/copyin-3.c,
1347         testsuite/libgomp.c++/copyin-1.C, testsuite/libgomp.c++/copyin-2.C,
1348         testsuite/libgomp.c++/ctor-5.C, testsuite/libgomp.c++/ctor-8.C,
1349         testsuite/libgomp.c++/ctor-9.C, testsuite/libgomp.c++/pr24455-1.C,
1350         testsuite/libgomp.c++/pr24455.C,
1351         testsuite/libgomp.fortran/threadprivate1.f90,
1352         testsuite/libgomp.fortran/threadprivate2.f90,
1353         testsuite/libgomp.fortran/threadprivate3.f90,
1354         testsuite/libgomp.fortran/appendix-a/a.22.7.f9,
1355         testsuite/libgomp.fortran/appendix-a/a.22.8.f9,
1356         testsuite/libgomp.fortran/omp_parse3.f90: Require
1357         effective-target TLS.
1358
1359 2005-11-14  Diego Novillo  <dnovillo@redhat.com>
1360
1361         * HEADER: Remove.
1362
1363 2005-11-13  Jakub Jelinek  <jakub@redhat.com>
1364
1365         PR libgomp/24797
1366         * team.c (initialize_team): Pass NULL rather than free as
1367         pthread_key_create destructor.  Initialize thread specific data
1368         pointer in initial thread to a static local variable rather than
1369         malloced memory.
1370
1371 2005-11-11  Uros Bizjak  <uros@kss-loka.si>
1372
1373         * testsuite/lib/libgomp-dg.exp: Locate libgcc.a and append
1374         its location to ld_library_path.
1375
1376 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
1377
1378         * testsuite/libgomp.c/c.exp: Rename from dg.exp.
1379
1380 2005-11-10  Diego Novillo  <dnovillo@redhat.com>
1381
1382         * testsuite/libgomp.c: Rename from libgomp.dg.
1383
1384 2005-11-09  Diego Novillo  <dnovillo@redhat.com>
1385
1386         * testsuite/libgomp.c++/pr24455.C: Add copyin clause for
1387         threadprivate variable 'i'.
1388
1389 2005-11-09  Jakub Jelinek  <jakub@redhat.com>
1390
1391         * config/linux/s390/futex.h: New file.
1392         * configure.tgt: Use it.
1393
1394         * testsuite/libgomp.fortran/omp_parse4.f90: Move n initialization
1395         before the parallel.
1396
1397 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
1398
1399         PR c++/24734
1400         * testsuite/libgomp.c++/master-1.C: New test.
1401
1402 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
1403
1404         * testsuite/libgomp.dg/copyin-3.c: New test.
1405
1406 2005-11-07  Jakub Jelinek  <jakub@redhat.com>
1407
1408         * testsuite/libgomp.fortran/retval1.f90: New test.
1409         * testsuite/libgomp.fortran/vla7.f90: New test.
1410
1411 2005-11-06  Jakub Jelinek  <jakub@redhat.com>
1412
1413         * testsuite/libgomp.fortran/vla2.f90: New test.
1414         * testsuite/libgomp.fortran/vla3.f90: New test.
1415         * testsuite/libgomp.fortran/vla4.f90: New test.
1416         * testsuite/libgomp.fortran/vla5.f90: New test.
1417         * testsuite/libgomp.fortran/vla6.f90: New test.
1418
1419 2005-11-01  Jakub Jelinek  <jakub@redhat.com>
1420
1421         * config/linux/sparc/futex.h: New file.
1422         * configure.tgt: Use it.
1423         * testsuite/lib/libgomp-dg.exp: Use -mcpu=v9 for sparc testing.
1424
1425         * critical.c: Include stdlib.h.
1426         * acinclude.m4 (LIBGOMP_CHECK_SYNC_BUILTINS): Avoid warnings about
1427         ignoring return value.
1428         * configure.ac: Don't put -Wc,-pthread into XCFLAGS until after
1429         LIBGOMP_CHECK_SYNC_BUILTINS check.
1430         * configure: Rebuilt.
1431
1432 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
1433
1434         * testsuite/libgomp.fortran/vla1.f90: New test.
1435
1436 2005-10-31  Richard Henderson  <rth@redhat.com>
1437
1438         * testsuite/libgomp.fortran/character2.f90: Fix race condition
1439         setting 's' in different threads.
1440
1441 2005-10-31  Jakub Jelinek  <jakub@redhat.com>
1442
1443         * libgomp.h (attribute_hidden, ialias): Define.
1444         * config/posix/proc.c (omp_get_num_procs): Add ialias.
1445         * config/posix/time.c (omp_get_wtime, omp_get_wtick): Likewise.
1446         * config/posix/lock.c (omp_init_lock, omp_init_nest_lock,
1447         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
1448         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
1449         omp_test_lock, omp_test_nest_lock): Likewise.
1450         * config/linux/lock.c (omp_init_lock, omp_init_nest_lock,
1451         omp_destroy_lock, omp_destroy_nest_lock, omp_set_lock,
1452         omp_set_nest_lock, omp_unset_lock, omp_unset_nest_lock,
1453         omp_test_lock, omp_test_nest_lock): Likewise.
1454         * env.c (omp_set_dynamic, omp_set_nested, omp_set_num_threads,
1455         omp_get_dynamic, omp_get_nested): Likewise.
1456         * parallel.c (omp_get_num_threads, omp_get_max_threads,
1457         omp_get_thread_num, omp_in_parallel): Likewise.
1458         * fortran.c (ialias_redirect): Define.
1459         (omp_init_lock, omp_init_nest_lock, omp_destroy_lock,
1460         omp_destroy_nest_lock, omp_set_lock, omp_set_nest_lock,
1461         omp_unset_lock, omp_unset_nest_lock, omp_test_lock,
1462         omp_test_nest_lock, omp_set_dynamic, omp_set_nested,
1463         omp_set_num_threads, omp_get_dynamic, omp_get_nested,
1464         omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
1465         omp_get_num_threads, omp_get_thread_num, omp_get_wtick,
1466         omp_get_wtime): Add ialias_redirect.
1467
1468 2005-10-30  Jakub Jelinek  <jakub@redhat.com>
1469
1470         * fortran.c: Include stdlib.h.
1471
1472 2005-10-29  Jakub Jelinek  <jakub@redhat.com>
1473
1474         * Makefile.am (env.o, env.lo): Depend on libgomp_f.h.
1475         * Makefile.in: Regenerated.
1476
1477 2005-10-28  Jakub Jelinek  <jakub@redhat.com>
1478
1479         * mkomp_h.pl: Remove all -Wc, option prefixes in $COMPILE.
1480         * libgomp_f.h.in (omp_check_defines): New function.
1481         * env.c: Include libgomp_f.h.
1482         (initialize_env): Call omp_check_defines.
1483
1484         * testsuite/libgomp.dg/copyin-2.c: New test.
1485         * testsuite/libgomp.c++/copyin-2.C: New test.
1486         * testsuite/libgomp.fortran/threadprivate3.f90: New test.
1487
1488         * testsuite/libgomp.fortran/threadprivate2.f90: New test.
1489         * testsuite/libgomp.fortran/sharing2.f90: New test.
1490
1491         * testsuite/libgomp.dg/copyin-1.c: New test.
1492         * testsuite/libgomp.c++/copyin-1.C: New test.
1493
1494 2005-10-26  Jakub Jelinek  <jakub@redhat.com>
1495
1496         * testsuite/libgomp.fortran/crayptr1.f90: New test.
1497
1498         * testsuite/libgomp.fortran/workshare1.f90: New test.
1499
1500         * libgomp.fortran/appendix-a/a.28.5.f90: Change into compile
1501         only test.
1502         * libgomp.fortran/sharing1.f90: New test.
1503
1504 2005-10-24  Jakub Jelinek  <jakub@redhat.com>
1505
1506         PR c++/24502
1507         * testsuite/libgomp.c++/loop-7.C: New test.
1508
1509         * testsuite/libgomp.dg/nestedfn-2.c: New test.
1510
1511         * testsuite/libgomp.dg/nestedfn-1.c: New test.
1512         * testsuite/libgomp.fortran/reduction6.f90: New test.
1513         * testsuite/libgomp.fortran/nestedfn1.f90: New test.
1514
1515 2005-10-23  Richard Henderson  <rth@redhat.com>
1516
1517         * testsuite/libgomp.c++/ctor-1.C: New.
1518         * testsuite/libgomp.c++/ctor-2.C: New.
1519         * testsuite/libgomp.c++/ctor-3.C: New.
1520         * testsuite/libgomp.c++/ctor-4.C: New.
1521         * testsuite/libgomp.c++/ctor-5.C: New.
1522         * testsuite/libgomp.c++/ctor-6.C: New.
1523         * testsuite/libgomp.c++/ctor-7.C: New.
1524         * testsuite/libgomp.c++/ctor-8.C: New.
1525         * testsuite/libgomp.c++/ctor-9.C: New.
1526
1527 2005-10-21  Diego Novillo  <dnovillo@redhat.com>
1528
1529         PR 24455
1530         * testsuite/libgomp.c++/pr24455-1.C: New test.
1531         * testsuite/libgomp.c++/pr24455.C: New test.
1532         * testsuite/libgomp.dg/pr24455-1.c: New test.
1533         * testsuite/libgomp.dg/pr24455.c: New test.
1534
1535 2005-10-20  Richard Henderson  <rth@redhat.com>
1536
1537         * testsuite/libgomp.c++/loop-6.C: New.
1538         * testsuite/libgomp.dg/loop-3.c: New.
1539
1540 2005-10-20  Jakub Jelinek  <jakub@redhat.com>
1541
1542         * testsuite/libgomp.fortran/jacobi.f: Don't make i and j
1543         explicitly private.
1544         * testsuite/libgomp.fortran/omp_parse1.f90 (test_do): Make i
1545         explicitly shared.
1546
1547 2005-10-19  Diego Novillo  <dnovillo@redhat.com>
1548
1549         * testsuite/libgomp.fortran/jacobi.f: New test.
1550
1551 2005-10-19  Richard Henderson  <rth@redhat.com>
1552
1553         * configure.tgt (i?86-linux): Default to with_arch instead of
1554         CFLAGS.  Add -mtune to match target_cpu.
1555         (x86_64-linux): Tune to i686.
1556
1557         * fortran.c (omp_test_nest_lock_): Fix typo.
1558
1559 2005-10-19  Jakub Jelinek  <jakub@redhat.com>
1560
1561         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
1562         gomp_ordered_sync): Do nothing if team->nthreads == 1.
1563         * testsuite/libgomp.dg/ordered-3.c: New test.
1564
1565         * testsuite/libgomp.dg/appendix-a/a.18.1.c: Remove unconditional abort.
1566         Remove volatile keyword.
1567
1568         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: Reorder variables
1569         in COMMON block to avoid warnings on 64-bit targets.
1570
1571 2005-10-18  Diego Novillo  <dnovillo@redhat.com>
1572
1573         * testsuite/libgomp.dg/shared-3.c: New test.
1574
1575 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1576
1577         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: Removed.
1578         * testsuite/libgomp.fortran/reduction5.f90: New test.
1579
1580 2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1581
1582         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Add -ffixed-form to
1583         dg-options.
1584         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: Likewise.  Enable
1585         flush loop now that __sync_synchronize has proper memory barrier.
1586         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: Fix a typo.
1587         Add -ffixed-form to dg-options.
1588
1589 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
1590
1591         * testsuite/libgomp.fortran/fortran.exp: Also gather tests
1592         from subdirectories.
1593         * testsuite/libgomp.fortran/appendix-a/a.15.1.f90: New test.
1594         * testsuite/libgomp.fortran/appendix-a/a.16.1.f90: New test.
1595         * testsuite/libgomp.fortran/appendix-a/a.18.1.f90: New test.
1596         * testsuite/libgomp.fortran/appendix-a/a.19.1.f90: New test.
1597         * testsuite/libgomp.fortran/appendix-a/a.2.1.f90: New test.
1598         * testsuite/libgomp.fortran/appendix-a/a.21.1.f90: New test.
1599         * testsuite/libgomp.fortran/appendix-a/a.22.7.f90: New test.
1600         * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: New test.
1601         * testsuite/libgomp.fortran/appendix-a/a.26.1.f90: New test.
1602         * testsuite/libgomp.fortran/appendix-a/a.28.1.f90: New test.
1603         * testsuite/libgomp.fortran/appendix-a/a.28.2.f90: New test.
1604         * testsuite/libgomp.fortran/appendix-a/a.28.3.f90: New test.
1605         * testsuite/libgomp.fortran/appendix-a/a.28.4.f90: New test.
1606         * testsuite/libgomp.fortran/appendix-a/a.28.5.f90: New test.
1607         * testsuite/libgomp.fortran/appendix-a/a.3.1.f90: New test.
1608         * testsuite/libgomp.fortran/appendix-a/a.31.3.f90: New test.
1609         * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: New test.
1610         * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: New test.
1611         * testsuite/libgomp.fortran/appendix-a/a.33.3.f90: New test.
1612         * testsuite/libgomp.fortran/appendix-a/a.38.1.f90: New test.
1613         * testsuite/libgomp.fortran/appendix-a/a.39.1.f90: New test.
1614         * testsuite/libgomp.fortran/appendix-a/a.4.1.f90: New test.
1615         * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: New test.
1616         * testsuite/libgomp.fortran/appendix-a/a.5.1.f90: New test.
1617         * testsuite/libgomp.fortran/appendix-a/a10.1.f90: New test.
1618
1619 2005-10-17  Jakub Jelinek  <jakub@redhat.com>
1620
1621         * testsuite/libgomp.dg/dg.exp: Only unset lang_* if
1622         lang_library_path exists.  Use find instead of glob to gather tests.
1623         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: Removed.
1624
1625 2005-10-17  Diego Novillo  <dnovillo@redhat.com>
1626
1627         * testsuite/libgomp.dg/appendix-a/a.15.1.c: New test.
1628         * testsuite/libgomp.dg/appendix-a/a.16.1.c: New test.
1629         * testsuite/libgomp.dg/appendix-a/a.18.1.c: New test.
1630         * testsuite/libgomp.dg/appendix-a/a.19.1.c: New test.
1631         * testsuite/libgomp.dg/appendix-a/a.2.1.c: New test.
1632         * testsuite/libgomp.dg/appendix-a/a.21.1.c: New test.
1633         * testsuite/libgomp.dg/appendix-a/a.26.1.c: New test.
1634         * testsuite/libgomp.dg/appendix-a/a.29.1.c: New test.
1635         * testsuite/libgomp.dg/appendix-a/a.3.1.c: New test.
1636         * testsuite/libgomp.dg/appendix-a/a.39.1.c: New test.
1637         * testsuite/libgomp.dg/appendix-a/a.4.1.c: New test.
1638         * testsuite/libgomp.dg/appendix-a/a.5.1.c: New test.
1639         * testsuite/libgomp.dg/appendix-a/appendix-a.exp: New file.
1640
1641 2005-10-15  Jakub Jelinek  <jakub@redhat.com>
1642
1643         * testsuite/libgomp.dg/vla-1.c: New test.
1644
1645         * testsuite/libgomp.fortran/reference2.f90: New test.
1646
1647         * testsuite/libgomp.fortran/character2.f90: Remove explicit
1648         declaration of omp_get_thread_num.
1649         * testsuite/libgomp.fortran/threadprivate1.f90: Likewise.  Add
1650         use omp_lib.
1651
1652         * testsuite/libgomp.fortran/reduction1.f90: New test.
1653         * testsuite/libgomp.fortran/reduction2.f90: New test.
1654         * testsuite/libgomp.fortran/reduction3.f90: New test.
1655         * testsuite/libgomp.fortran/reduction4.f90: New test.
1656
1657 2005-10-13  Richard Henderson  <rth@redhat.com>
1658
1659         * Makefile.am (libgomp_la_SOURCES): Add bar.c.
1660         * Makefile.in: Regenerate.
1661         * barrier.c (GOMP_barrier): Use gomp_barrier_wait.
1662         * libgomp.h: Include bar.h.
1663         (struct gomp_barrier): Remove.
1664         (struct gomp_team): Add barrier.  Replace master_barrier with
1665         master_release.  Replace threads with ordered_release.
1666         (struct gomp_thread): Replace barrier with release.
1667         * ordered.c (gomp_ordered_first): Update for ordered_release change.
1668         (gomp_ordered_last, gomp_ordered_next, gomp_ordered_static_init,
1669         gomp_ordered_static_next, gomp_ordered_sync): Likewise.
1670         * single.c (GOMP_single_copy_start): Use gomp_barrier_wait.
1671         (GOMP_single_copy_end): Likewise.
1672         * team.c (gomp_threads_dock): New.
1673         (gomp_barrier_init, gomp_barrier_destroy): Remove.
1674         (gomp_thread_start): Use gomp_barrier_wait.
1675         (new_team, free_team): Update for gomp_team changes.
1676         (gomp_team_start): Use gomp_barrier_wait and gomp_barrier_reinit.
1677         (gomp_team_end): Use gomp_barrier_wait.
1678         (initialize_team): Update for gomp_thread changes.
1679         * work.c (gomp_work_share_end): Use gomp_barrier_wait_start.
1680         (gomp_work_share_end_nowait): Use atomic ops when available.
1681         * config/linux/bar.c, config/linux/bar.h: New files.
1682         * config/posix/bar.c, config/posix/bar.h: New files.
1683
1684 2005-10-13  Jakub Jelinek  <jakub@redhat.com>
1685
1686         * single.c (GOMP_single_copy_end): Don't segfault if team is NULL.
1687         * testsuite/libgomp.dg/single-2.c: New test.
1688
1689         * testsuite/libgomp.dg/dg.exp (lang_library_path, lang_test_file,
1690         lang_link_flags): Unset, so that they aren't inherited from previously
1691         sourced *.exp.
1692
1693         * testsuite/libgomp.fortran/threadprivate1.f90: New test.
1694
1695 2005-10-12  Richard Henderson  <rth@redhat.com>
1696
1697         * testsuite/lib/libgomp-dg.exp: Set blddir at toplevel.
1698         (libgomp_init): Use lang_test_file, lang_library_path, and
1699         lang_link_flags, set by the subdirectory files.  Add -fopenmp here.
1700
1701         * testsuite/libgomp.fortran/fortran.exp (lang_library_path): New.
1702         (lang_test_file, lang_link_flags): New.
1703         (DEFAULT_FFLAGS, ALWAYS_CFLAGS, multilibs, blddir): Remove.
1704
1705         * testsuite/libgomp.c++/c++.exp, testsuite/libgomp.c++/loop-1.C,
1706         testsuite/libgomp.c++/loop-2.C, testsuite/libgomp.c++/loop-3.C,
1707         testsuite/libgomp.c++/loop-4.C, testsuite/libgomp.c++/nested-1.C,
1708         testsuite/libgomp.c++/parallel-1.C,
1709         testsuite/libgomp.c++/reduction-1.C,
1710         testsuite/libgomp.c++/reduction-2.C,
1711         testsuite/libgomp.c++/reduction-3.C,
1712         testsuite/libgomp.c++/sections-1.C, testsuite/libgomp.c++/shared-1.C,
1713         testsuite/libgomp.c++/shared-2.C, testsuite/libgomp.c++/single-1.C,
1714         testsuite/libgomp.c++/single-2.C, testsuite/libgomp.c++/single-3.C:
1715         New files, largely cribbed from the C testsuite.
1716
1717 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
1718
1719         * testsuite/libgomp.fortran/character1.f90: New test.
1720         * testsuite/libgomp.fortran/character2.f90: New test.
1721
1722         * testsuite/libgomp.dg/nested-1.c: New test.
1723         * testsuite/libgomp.dg/nested-2.c: New test.
1724         * testsuite/libgomp.fortran/do1.f90: New test.
1725         * testsuite/libgomp.fortran/do2.f90: New test.
1726
1727         * testsuite/libgomp.fortran/reference1.f90: New test.
1728
1729 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
1730
1731         * testsuite/libgomp.dg/reduction-1.c: New test.
1732         * testsuite/libgomp.dg/reduction-2.c: New test.
1733         * testsuite/libgomp.dg/reduction-3.c: New test.
1734
1735 2005-10-10  Jakub Jelinek  <jakub@redhat.com>
1736
1737         * testsuite/libgomp.dg/atomic-1.c: New test.
1738         * testsuite/libgomp.dg/atomic-2.c: New test.
1739
1740 2005-10-09  Richard Henderson  <rth@redhat.com>
1741
1742         * critical.c (atomic_lock): New.
1743         (initialize_critical): Initialize it.
1744         (GOMP_atomic_start, GOMP_atomic_end): New.
1745         * libgomp.map: Export them.
1746         * libgomp_g.h: Declare them.
1747
1748         * testsuite/libgomp.dg/atomic-10.c: Move from gcc testsuite.
1749
1750 2005-10-02  Richard Henderson  <rth@redhat.com>
1751
1752         * configure.ac: Move save_CFLAGS hack earlier.  Append -Wall/-Werror
1753         to XCFLAGS instead of CFLAGS.
1754
1755 2005-09-30  Richard Henderson  <rth@redhat.com>
1756
1757         * configure.ac: Determine whether -pthread or -lpthread is needed.
1758         * Makefile.am (libgomp_la_LDFLAGS): Remove explicit -lpthread.
1759         * Makefine.in, configure: Rebuild.
1760
1761 2005-09-28  Richard Henderson  <rth@redhat.com>
1762
1763         * testsuite/libgomp.dg/omp-loop03.c: Fix return code.
1764         * testsuite/libgomp.dg/omp-single-3.c: New test.
1765
1766 2005-09-28  Diego Novillo  <dnovillo@redhat.com>
1767
1768         * testsuite/libgomp.dg/omp-single-2.c: New test.
1769         * testsuite/libgomp.dg/shared-2.c: Fix return code.
1770
1771 2005-09-27  Richard Henderson  <rth@redhat.com>
1772
1773         * testsuite/libgomp.dg/omp-loop03.c: Add initial barrier.
1774         * testsuite/libgomp.dg/omp-parallel-for.c: Specify static schedule.
1775
1776 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
1777
1778         * testsuite/libgomp.dg/omp-loop03.c: New test.
1779
1780 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
1781
1782         * testsuite/libgomp.dg/omp-parallel-for.c: New test.
1783
1784 2005-09-27  Diego Novillo  <dnovillo@redhat.com>
1785
1786         * testsuite/libgomp.dg/omp-single-1.c: New test.
1787         * testsuite/libgomp.dg/shared-1.c: Return 0.
1788         Add prototype for abort.
1789         * testsuite/libgomp.dg/shared-2.c: Likewise.
1790
1791 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
1792
1793         * testsuite/libgomp.fortran/omp_parse3.f90: Fix non-conforming
1794         constructs.
1795
1796 2005-09-26  Diego Novillo  <dnovillo@redhat.com>
1797
1798         * testsuite/libgomp.dg/shared-1.c: New test.
1799         * testsuite/libgomp.dg/shared-2.c: New test.
1800
1801 2005-09-24  Richard Henderson  <rth@redhat.com>
1802
1803         * testsuite/libgomp.dg/omp_workshare3.c: Mark dg-error.
1804
1805 2005-09-24  Richard Henderson  <rth@redhat.com>
1806
1807         * iter.c (gomp_iter_static_next): Round up when computing number
1808         of iterations.  Don't bother distributing a remainder equally.
1809
1810         * testsuite/libgomp.dg/omp-loop01.c (main1): Rename from main.
1811         Don't call srand.  Zero b before testing.
1812         (main): New.
1813
1814 2005-09-24  Jakub Jelinek  <jakub@redhat.com>
1815
1816         * testsuite/libgomp.fortran/omp_atomic1.f90: New test.
1817         * testsuite/libgomp.fortran/omp_atomic2.f90: New test.
1818
1819 2005-09-23  Jakub Jelinek  <jakub@redhat.com>
1820
1821         * testsuite/libgomp.fortran/omp_parse1.f90: Add a test for !$omp do
1822         without !$omp end do, followed immediately by subroutine end.
1823
1824 2005-09-23  Diego Novillo  <dnovillo@redhat.com>
1825
1826         * testsuite/libgomp.dg/omp-parallel-if.c: New test.
1827
1828 2005-09-22  Richard Henderson  <rth@redhat.com>
1829
1830         * critical.c (GOMP_critical_name_start): Change argument to void**.
1831         Reuse the pointer space if the mutex fits.
1832         (GOMP_critical_name_end): Likewise.
1833         (initialize_critical): Don't define if GOMP_MUTEX_INIT_0.
1834         * libgomp_g.h (GOMP_critical_name_start): Update decl.
1835         (GOMP_critical_name_end): Likewise.
1836         * config/linux/mutex.h (GOMP_MUTEX_INIT_0): New.
1837         * config/posix/mutex.h (GOMP_MUTEX_INIT_0): New.
1838
1839 2005-09-20  Richard Henderson  <rth@redhat.com>
1840
1841         * critical.c (GOMP_critical_name_start, GOMP_critical_name_end): New.
1842         (create_lock_lock): New.
1843         (initialize_critical): Initialize it.
1844         * libgomp.map (GOMP_critical_name_start, GOMP_critical_name_end): New.
1845         * libgomp_g.h (GOMP_ordered_start, GOMP_ordered_end): Declare.
1846
1847 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
1848
1849         * testsuite/libgom.dg/omp-loop01.c: Include stdio.h.
1850
1851 2005-09-20  Diego Novillo  <dnovillo@redhat.com>
1852
1853         * testsuite/libgomp.dg/omp-loop01.c: New test.
1854         * testsuite/libgomp.dg/omp-loop02.c: New test.
1855
1856 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
1857
1858         * configure.ac (AC_PROG_FC): Add.
1859         (USE_FORTRAN): New automake conditional.
1860         * configure: Rebuilt.
1861         * Makefile.am (libgomp_la_SOURCES): Add fortran.c.
1862         (nodist_include_HEADERS): Add omp_lib.h, omp_lib.f90 and libgomp_f.h.
1863         If USE_FORTRAN, add also omp_lib.mod and omp_lib_kinds.mod.
1864         Add rules to build them.
1865         * Makefile.in: Rebuilt.
1866         * mkomp_h.pl: Compute and replace also OMP_LOCK_KIND and
1867         OMP_NEST_LOCK_KIND.
1868         * libgomp.map: Add Fortran wrappers.
1869         * libgomp_f.h.in: New file.
1870         * omp_lib.h.in: New file.
1871         * omp_lib.f90.in: New file.
1872         * fortran.c: New file.
1873         * testsuite/lib/libgomp-dg.exp: Load a few more .exp files.
1874         Append libgfortran directory to LD_LIBRARY_PATH if it exists.
1875         Add -Lpath_to_libgfortran and -lgfortran -lgfortranbegin if
1876         libgfortran has been built.
1877         * testsuite/libgomp.fortran/fortran.exp: New file.
1878         * testsuite/libgomp.fortran/omp_cond1.f: New test.
1879         * testsuite/libgomp.fortran/omp_cond2.f: New test.
1880         * testsuite/libgomp.fortran/omp_cond3.F90: New test.
1881         * testsuite/libgomp.fortran/omp_cond4.F90: New test.
1882         * testsuite/libgomp.fortran/omp_hello.f: New test.
1883         * testsuite/libgomp.fortran/omp_orphan.f: New test.
1884         * testsuite/libgomp.fortran/omp_parse1.f90: New test.
1885         * testsuite/libgomp.fortran/omp_parse2.f90: New test.
1886         * testsuite/libgomp.fortran/omp_parse3.f90: New test.
1887         * testsuite/libgomp.fortran/omp_parse4.f90: New test.
1888         * testsuite/libgomp.fortran/omp_reduction.f: New test.
1889         * testsuite/libgomp.fortran/omp_workshare1.f: New test.
1890         * testsuite/libgomp.fortran/omp_workshare2.f: New test.
1891
1892 2005-08-30  Richard Henderson  <rth@redhat.com>
1893
1894         * loop.c (GOMP_loop_static_start): Provide fallback wrapper
1895         function for when aliases are not usable.
1896         (GOMP_loop_dynamic_start, GOMP_loop_guided_start,
1897         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
1898         GOMP_loop_ordered_guided_start, GOMP_loop_static_next,
1899         GOMP_loop_dynamic_next, GOMP_loop_guided_next,
1900         GOMP_loop_ordered_static_next, GOMP_loop_ordered_dynamic_next,
1901         GOMP_loop_ordered_guided_next): Likewise.
1902         * ordered.c (GOMP_ordered_start): Likewise.
1903
1904 2005-08-01  Diego Novillo  <dnovillo@redhat.com>
1905
1906         * testsuite/libgomp.dg/dg.exp: Use -O2 for now.
1907         * testsuite/libgomp.dg/omp_hello.c: Fix return code
1908         * testsuite/libgomp.dg/omp_matvec.c: Likewise.
1909         * testsuite/libgomp.dg/omp_orphan.c: Likewise
1910         * testsuite/libgomp.dg/omp_reduction.c: Likewise
1911         * testsuite/libgomp.dg/omp_workshare1.c: Likewise
1912         * testsuite/libgomp.dg/omp_workshare2.c: Likewise
1913         * testsuite/libgomp.dg/omp_workshare3.c: Likewise
1914         * testsuite/libgomp.dg/omp_workshare4.c: Likewise
1915
1916 2005-07-07  Eric Christopher  <echristo@redhat.com>
1917             Diego Novillo  <dnovillo@redhat.com>
1918
1919         * testsuite/libgomp.dg/dg.exp: Add -fopenmp to DEFAULT_CFLAGS.
1920         * testsuite/libgomp.dg/omp_hello.c: Add standard includes, fix
1921         up code.
1922         * testsuite/libgomp.dg/omp_matvec.c: Ditto.
1923         * testsuite/libgomp.dg/omp_orphan.c: Ditto.
1924         * testsuite/libgomp.dg/omp_reduction.c: Ditto.
1925         * testsuite/libgomp.dg/omp_workshare1.c: Ditto.
1926         * testsuite/libgomp.dg/omp_workshare2.c: Ditto.
1927         * testsuite/libgomp.dg/omp_workshare3.c: Ditto.
1928         * testsuite/libgomp.dg/omp_workshare4.c: Ditto.
1929
1930 2005-06-13  Diego Novillo  <dnovillo@redhat.com>
1931
1932         * TOPLEVEL.patch: Remove.
1933
1934 2005-05-16  Richard Henderson  <rth@redhat.com>
1935
1936         * configure.ac: Test for clock_gettime.
1937         * config.h.in, configure: Rebuild.
1938         * config/posix/time.c: Use recommended TIME_WITH_SYS_TIME pattern.
1939         (omp_get_wtime): Use clock_gettime if available.
1940         (omp_get_wtick): Use clock_getres if available.
1941
1942 2005-05-11  Richard Henderson  <rth@redhat.com>
1943
1944         * config/linux/ia64/futex.h: New file.
1945         * configure.tgt: Use it.
1946
1947         * team.c (gomp_barrier_init, gomp_barrier_destroy): Mark inline.
1948
1949 2005-05-07  Richard Henderson  <rth@redhat.com>
1950
1951         * config/linux/powerpc/futex.h: New file.
1952         * configure.tgt: Use it.
1953
1954         * config/linux/i486/futex.h: Merge ...
1955         * config/linux/x86_64/futex.h: ... into ...
1956         * config/linux/x86/futex.h: ... here.
1957         * configure.tgt: Update to match.
1958
1959 2005-05-06  Richard Henderson  <rth@redhat.com>
1960
1961         * config/linux/alpha/futex.h: Conditionally define SYS_futex.
1962         * config/linux/i486/futex.h: Likewise.
1963         * config/linux/x86_64/futex.h: Likewise.
1964
1965         * config/linux/lock.c: New file.
1966         * config/linux/omp-lock.h: New file.
1967
1968         * critical.c, env.h: Don't include omp.h
1969         * config/posix/lock.c: Include libgomp.h instead of omp.h.
1970         * config/posix/time.c: Likewise.
1971         * config/posix/omp-lock.h: New file.
1972         * libgomp.h: Include omp-lock.h and omp.h.
1973         * Makefile.am (nodist_include_HEADERS): New.
1974         (omp.h): New rule.
1975         * configure.ac (PERL): New.
1976         * mkomp_h.pl: New file.
1977         * omp.h.in: Rename from omp.h; replace omp_lock_t and omp_nest_lock_t
1978         with templates.
1979         * Makefile.in, configure, testsuite/Makefile.in: Rebuild.
1980
1981         * testsuite/lib/libgomp-dg.exp (libgomp_init): Add include into
1982         build directory.  Re-add -march=i486 hack.
1983
1984         * testsuite/lib/libgomp-dg.exp (libgomp_compile_flags): Remove.
1985         (libgomp_link_flags): Remove.
1986         (libgomp_initialized): Remove.
1987         (libgomp_init): Don't protect from reinitialization.  Copy code
1988         from libstdc++ for getting the multilib set correctly.
1989
1990 2005-05-05  Richard Henderson  <rth@redhat.com>
1991
1992         * config/linux/alpha/futex.h: New file.
1993         * configure.tgt (alpha*-*-linux*): Use it.
1994
1995         * config/posix/mutex.c: New file.
1996         * config/posix/sem.c: Use libgomp.h.
1997
1998         * configure.tgt (x86_64-linux): Also test CC for -m32.
1999         * config/linux/x86_64/futex.h (futex_wait): Fix r10 usage.
2000
2001         * testsuite/lib/libgomp-dg.exp (libgomp_link_flags): Add /
2002         after $gccpath.
2003
2004         * Makefile.am (SUBDIRS): New.
2005         (libgomp_la_LDFLAGS): Add -lpthread.
2006         * configure.ac (AM_INIT_AUTOMAKE): Enable dependencies.
2007         * Makefile.in, aclocal.m4, config.h.in, configure: Rebuild.
2008
2009         * libgomp_g.h: New file.
2010         * libgomp.h: Split out all public declarations to libgomp_g.h.
2011         Use pragma GCC visibility instead of ATTRIBUTE_HIDDEN.
2012         * config/linux/mutex.h: Remove ATTRIBUTE_HIDDEN.
2013         * config/linux/sem.h: Likewise.
2014         * config/posix/sem.h: Likewise.
2015
2016         * Makefile.am (AM_LDFLAGS): New.
2017         (libgomp_version_script): Split out from ...
2018         (libgomp_la_LDFLAGS): ... here.
2019         (libgomp_version_info): New.
2020         * acinclude.m4 (LIBGOMP_CHECK_TLS): Use LIBGOMP_ENABLE.
2021         (LIBGOMP_ENABLE): New.
2022         (LIBGOMP_CHECK_LINKER_FEATURES): New.
2023         (LIBGOMP_ENABLE_SYMVERS): New.
2024         * configure.ac (AC_INIT): Version 1.0.
2025         (enable-version-specific-runtime-libs): Use LIBGOMP_ENABLE.
2026         (enable-linux-futex): Likewise.  Rename from enable-futex.
2027         (libtool_VERSION): New.
2028         (LIBGOMP_ENABLE_SYMVERS): Use it.
2029         * configure.tgt: Check with_gnu_ld wrt have_tls optimizations.
2030         * Makefile.in, aclocal.m4, configure: Rebuild.
2031
2032         * config/linux/mutex.c: Include libgomp.h instead of mutex.h.
2033         (gomp_mutex_unlock_slow): Fix typo.
2034         * config/linux/sem.c: Similarly.
2035         (gomp_sem_post_slow): Fix typo.
2036         * config/linux/sem.h (gomp_sem_post_slow): Fix typo.
2037         * config/linux/i486/futex.h: Remove USE_LINUX_SYSENTER code.
2038         [__PIC__] (sys_futex0): Don't use tmp output in asm.
2039
2040         * Makefile.am (AM_CFLAGS): Expand with XCFLAGS.
2041         (libgomp_la_LDFLAGS): Add top_srcdir to path.
2042         * acinclude.m4: Copy libtool.m4 stuff from libgfortran.
2043         * configure.ac: Check for getloadavg.  Substitute XCFLAGS and
2044         XLDFLAGS.  Add XCFLAGS to CFLAGS around LIBGOMP_CHECK_SYNC_BUILTINS.
2045         * configure.tgt: Set XCFLAGS and XLDFLAGS instead of CFLAGS and
2046         LDFLAGS.  Pull enable_futex check to top-level.
2047         * libgomp.h: Fix sem.h and mutex.h includes.  Define ATTRIBUTE_HIDDEN.
2048         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
2049
2050         First attempt at real configury.
2051         * Makefile, config.h: Remove file.
2052         * Makefile.am, Makefile.in: New file.
2053         * acinclude.m4 aclocal.m4: New file.
2054         * configure.ac, configure.tgt, configure: New file.
2055
2056         * config/posix/lock.c: Rename from sys-lock.c.
2057         * config/posix/mutex.h: Rename from sys-mutex.h.
2058         * config/posix/sem.c: Rename from sys-sem.c.
2059         * config/posix/sem.h: Rename from sys-sem.h.
2060         * config/posix/proc.c: Rename from sys-proc.c.
2061         * config/posix/time.c: Rename from sys-proc.c.
2062
2063         * config/linux/mutex.c: New file.
2064         * config/linux/mutex.h: New file.
2065         * config/linux/sem.c: New file.
2066         * config/linux/sem.h: New file.
2067         * config/linux/i486/futex.h: New file.
2068         * config/linux/x86_64/futex.h: New file.
2069
2070 2005-05-04  Richard Henderson  <rth@redhat.com>
2071
2072         * iter.c (gomp_iter_dynamic_next, gomp_iter_guided_next): New.
2073         * libgomp.h: Declare them.
2074         * loop.c (gomp_loop_dynamic_start, gomp_loop_guided_start,
2075         gomp_loop_dynamic_next, gomp_loop_guided_next): Use them.
2076
2077 2005-05-04  Richard Henderson  <rth@redhat.com>
2078
2079         * libgomp-1 code drop
2080
2081 2005-05-04  Richard Henderson  <rth@redhat.com>
2082
2083         * iter.c (gomp_iter_static_next): Return tri-state on 0.
2084         * ordered.c (gomp_ordered_static_next): Remove not_last argument.
2085         * libgomp.h (struct gomp_team_state): Make static_trip unsigned.
2086         (gomp_iter_static_next): Update.
2087         (gomp_ordered_static_next): Update.
2088         * loop.c (gomp_loop_static_start): Update for gomp_iter_static_next.
2089         (gomp_loop_ordered_static_start): Likewise.  Exit early for a
2090         totally empty range.
2091         (gomp_loop_ordered_static_next): Refine test for calling
2092         gomp_ordered_static_next.
2093         * testsuite/ordered-1.c: Add case for more threads than iterations.
2094
2095         * iter.c (gomp_iter_runtime_next_locked): Remove.
2096         * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start,
2097         gomp_loop_guided_start, gomp_loop_ordered_static_start,
2098         gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start,
2099         gomp_loop_static_next, gomp_loop_dynamic_next, gomp_loop_guided_next,
2100         gomp_loop_ordered_static_next, gomp_loop_ordered_dynamic_next,
2101         gomp_loop_ordered_guided_next): Downcase name, make static, add
2102         an external alias with the old name.
2103         (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
2104         GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Use a
2105         switch and call one of the above static functions.
2106         * libgomp.h: Update.
2107
2108         * work.c (gomp_work_share_start): Lock the mutex for !first too.
2109         * loop.c (GOMP_loop_static_start, GOMP_loop_dynamic_start,
2110         GOMP_loop_guided_start, GOMP_loop_runtime_start,
2111         GOMP_loop_ordered_static_start, GOMP_loop_ordered_dynamic_start,
2112         GOMP_loop_ordered_guided_start): Update to match.
2113         * sections.c (GOMP_sections_start): Likewise.
2114         * single.c (GOMP_single_start, GOMP_single_copy_start): Likewise.
2115
2116         * ordered.c (gomp_ordered_first, gomp_ordered_last, gomp_ordered_next,
2117         gomp_ordered_static_init, gomp_ordered_static_next): Rename s/_loop//.
2118         Use bounds check instead of modulus.
2119         (gomp_ordered_sync): Split out of GOMP_ordered_start.
2120         (gomp_ordered_last): Don't sync with ordered_owner here.
2121         (gomp_ordered_next): Likewise.
2122         (gomp_ordered_static_loop_next): Likewise.
2123         * loop.c, libgomp.h: Update to match.
2124
2125         * libgomp.h (GOMP_barrier): Declare.
2126
2127         * testsuite/barrier-1.c: New file.
2128         * testsuite/critical-1.c: New file.
2129         * testsuite/ordered-2.c: New file.
2130         * testsuite/ordered-1.c: New file.
2131         * testsuite/sections-1.c: New file.
2132         * testsuite/single-1.c: New file.
2133         * testsuite/Makefile (TESTS): Add them.
2134
2135 2005-05-04  Richard Henderson  <rth@redhat.com>
2136
2137         * libgomp.h (struct gomp_work_share): Add ordered_owner.
2138         * loop.c (GOMP_loop_static_start): If not the startup thread,
2139         acquire the mutex to wait for initialization complete.
2140         (GOMP_loop_ordered_static_start): Likewise.
2141         (GOMP_loop_ordered_runtime_start): Likewise.
2142         (GOMP_loop_ordered_static_first): Remove.
2143         (GOMP_loop_ordered_dynamic_first): Remove.
2144         (GOMP_loop_ordered_guided_first): Remove.
2145         (GOMP_loop_ordered_runtime_first): Remove.
2146         * ordered.c (gomp_ordered_loop_first): Post to own release when
2147         we're the first thread.
2148         (gomp_ordered_loop_last): Wait on release if not owner.
2149         (gomp_ordered_loop_next): Likewise.
2150         (gomp_ordered_static_loop_init): New.
2151         (gomp_ordered_static_loop_next): Use ordered_owner.
2152         (GOMP_ordered_start): Likewise.
2153         * work.c (gomp_new_work_share): Initialize ordered_owner.
2154
2155 2005-05-03  Richard Henderson  <rth@redhat.com>
2156
2157         * Makefile (OPT): New.
2158         (CFLAGS): Use it.
2159
2160         * loop.c (GOMP_loop_end, GOMP_loop_end_nowait): New.
2161         * sections.c (GOMP_sections_end, GOMP_sections_end_nowait): New.
2162         * libgomp.h, libgomp.map, NOTES: Update to match.
2163
2164         * team.c (struct gomp_thread_start_data): Remove ts, fn, data.
2165         Add initialized and thr members.
2166         (gomp_thread_start): Pause when initially spawned to wait for
2167         the whole team to be created.
2168         (gomp_team_start): Release team members at the end.
2169
2170         * testsuite/loop-1.c (N): New.  Use it instead of hardcoded 100.
2171         (f_foo_1): Use GOMP_loop_end.
2172         (f_foo_2): Use GOMP_loop_end_nowait.
2173
2174         * testsuite/loop-2.c: New file.
2175         * testsuite/Makefile (TESTS): Add it.
2176
2177 2005-05-03  Richard Henderson  <rth@redhat.com>
2178
2179         * iter.c (gomp_iter_static_next): Fix overflow check typo.
2180         (gomp_iter_dynamic_next_locked): Fix overflow check thinko.
2181         * team.c (new_team): Initialize oldest_live_gen to 1 if no
2182         initial work_share.
2183
2184         * testsuite/Makefile: New file.
2185         * testsuite/loop-1.c: New file.
2186
2187 2005-05-03  Richard Henderson  <rth@redhat.com>
2188
2189         Initial implementation and checkin.