OSDN Git Service

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