aboutsummaryrefslogtreecommitdiff
path: root/libgomp/team.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-09-03 11:34:28 +0000
committerSebastian Huber <sh@gcc.gnu.org>2015-09-03 11:34:28 +0000
commit06441dd5e3630dbeae13028968d0b12926211009 (patch)
tree052af5b0dae75a0d1bac729a2ab635e831bb7933 /libgomp/team.c
parent66c59f92387c99ea5724cba69843f7dfb7593740 (diff)
downloadgcc-06441dd5e3630dbeae13028968d0b12926211009.zip
gcc-06441dd5e3630dbeae13028968d0b12926211009.tar.gz
gcc-06441dd5e3630dbeae13028968d0b12926211009.tar.bz2
[gomp] Add thread attribute customization
libgomp/ChangeLog * config/posix/pool.h (gomp_adjust_thread_attr): New. * config/rtems/pool.h (gomp_adjust_thread_attr): Likewise. (gomp_thread_pool_reservoir): Add priority member. * confi/rtems/proc.c (allocate_thread_pool_reservoir): Add priority. (parse_thread_pools): Likewise. * team.c (gomp_team_start): Call configuration provided gomp_adjust_thread_attr(). Destroy thread attributes if necessary. * libgomp.texi: Document GOMP_RTEMS_THREAD_POOLS. From-SVN: r227442
Diffstat (limited to 'libgomp/team.c')
-rw-r--r--libgomp/team.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/team.c b/libgomp/team.c
index 274f3ed..67e25b3 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -799,12 +799,13 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
start_data->thread_pool = pool;
start_data->nested = nested;
+ attr = gomp_adjust_thread_attr (attr, &thread_attr);
err = pthread_create (&pt, attr, gomp_thread_start, start_data++);
if (err != 0)
gomp_fatal ("Thread creation failed: %s", strerror (err));
}
- if (__builtin_expect (gomp_places_list != NULL, 0))
+ if (__builtin_expect (attr == &thread_attr, 0))
pthread_attr_destroy (&thread_attr);
do_release: