diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-02 14:13:12 +0000 |
---|---|---|
committer | Sebastian Huber <sh@gcc.gnu.org> | 2016-12-02 14:13:12 +0000 |
commit | e7a7f4bea8356e24ca5f2c25a75dc005c7492f89 (patch) | |
tree | 8ca30f0332f0da78a9d5fa75b3d15687858c3b10 /libgomp/config/rtems/proc.c | |
parent | 714445ae04640bc096693623fb805bcf14148663 (diff) | |
download | gcc-e7a7f4bea8356e24ca5f2c25a75dc005c7492f89.zip gcc-e7a7f4bea8356e24ca5f2c25a75dc005c7492f89.tar.gz gcc-e7a7f4bea8356e24ca5f2c25a75dc005c7492f89.tar.bz2 |
[RTEMS] Use spin lock for pool management
libgomp/
* libgomp/config/rtems/pool.h (gomp_thread_pool_reservoir): Use
pthread_spinlock_t instead of gomp_mutex_t lock.
(gomp_get_thread_pool): Likewise.
(gomp_release_thread_pool): Likewise.
* libgomp/config/rtems/proc.c (allocate_thread_pool_reservoir):
Likewise.
From-SVN: r243181
Diffstat (limited to 'libgomp/config/rtems/proc.c')
-rw-r--r-- | libgomp/config/rtems/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgomp/config/rtems/proc.c b/libgomp/config/rtems/proc.c index d4123d2..5e04b47 100644 --- a/libgomp/config/rtems/proc.c +++ b/libgomp/config/rtems/proc.c @@ -66,7 +66,7 @@ allocate_thread_pool_reservoir (unsigned long count, unsigned long priority, res->index = count; res->priority = priority; gomp_sem_init (&res->available, count); - gomp_mutex_init (&res->lock); + pthread_spin_init (&res->lock, PTHREAD_PROCESS_PRIVATE); for (i = 0; i < count; ++i) res->pools[i] = &pools[i]; gomp_thread_pool_reservoirs[scheduler] = res; |