diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-04 22:01:04 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-04 22:01:04 +0000 |
commit | 658b4427632fb21c83de781de89f2e28b0677ad4 (patch) | |
tree | b31d787cdf4d4c1cd8c9c32bf14a39a197816b6e /libgomp | |
parent | b71f72d7e2bfaac7cf383a8857e53ad3cd0e038b (diff) | |
download | gcc-658b4427632fb21c83de781de89f2e28b0677ad4.tar.gz |
* omp-low.c (optimize_omp_library_calls): New function.
(expand_omp_parallel): Call it if optimizing.
* omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 4 | ||||
-rw-r--r-- | libgomp/omp.h.in | 49 |
2 files changed, 30 insertions, 23 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 76293bdd8ce..7d3ef12a719 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2007-12-04 Jakub Jelinek <jakub@redhat.com> + + * omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes. + 2007-12-03 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.c/private-1.c: New test. diff --git a/libgomp/omp.h.in b/libgomp/omp.h.in index 44fda9088c3..5ebcdbb2735 100644 --- a/libgomp/omp.h.in +++ b/libgomp/omp.h.in @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2007 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU OpenMP Library (libgomp). @@ -49,36 +49,39 @@ typedef struct #ifdef __cplusplus extern "C" { +# define __GOMP_NOTHROW throw () +#else +# define __GOMP_NOTHROW __attribute__((__nothrow__)) #endif -extern void omp_set_num_threads (int); -extern int omp_get_num_threads (void); -extern int omp_get_max_threads (void); -extern int omp_get_thread_num (void); -extern int omp_get_num_procs (void); +extern void omp_set_num_threads (int) __GOMP_NOTHROW; +extern int omp_get_num_threads (void) __GOMP_NOTHROW; +extern int omp_get_max_threads (void) __GOMP_NOTHROW; +extern int omp_get_thread_num (void) __GOMP_NOTHROW; +extern int omp_get_num_procs (void) __GOMP_NOTHROW; -extern int omp_in_parallel (void); +extern int omp_in_parallel (void) __GOMP_NOTHROW; -extern void omp_set_dynamic (int); -extern int omp_get_dynamic (void); +extern void omp_set_dynamic (int) __GOMP_NOTHROW; +extern int omp_get_dynamic (void) __GOMP_NOTHROW; -extern void omp_set_nested (int); -extern int omp_get_nested (void); +extern void omp_set_nested (int) __GOMP_NOTHROW; +extern int omp_get_nested (void) __GOMP_NOTHROW; -extern void omp_init_lock (omp_lock_t *); -extern void omp_destroy_lock (omp_lock_t *); -extern void omp_set_lock (omp_lock_t *); -extern void omp_unset_lock (omp_lock_t *); -extern int omp_test_lock (omp_lock_t *); +extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW; +extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW; +extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW; +extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW; +extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW; -extern void omp_init_nest_lock (omp_nest_lock_t *); -extern void omp_destroy_nest_lock (omp_nest_lock_t *); -extern void omp_set_nest_lock (omp_nest_lock_t *); -extern void omp_unset_nest_lock (omp_nest_lock_t *); -extern int omp_test_nest_lock (omp_nest_lock_t *); +extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; +extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; +extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; +extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; +extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; -extern double omp_get_wtime (void); -extern double omp_get_wtick (void); +extern double omp_get_wtime (void) __GOMP_NOTHROW; +extern double omp_get_wtick (void) __GOMP_NOTHROW; #ifdef __cplusplus } |