diff mbox

libgomp: Add comment to clarify last_team usage

Message ID 1435928967-4909-1-git-send-email-sebastian.huber@embedded-brains.de
State New
Headers show

Commit Message

Sebastian Huber July 3, 2015, 1:09 p.m. UTC
libgomp/ChangeLog
2015-07-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libgomp.h (gomp_thread_pool): Comment last_team field.
---
 libgomp/libgomp.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jakub Jelinek July 3, 2015, 1:18 p.m. UTC | #1
On Fri, Jul 03, 2015 at 03:09:27PM +0200, Sebastian Huber wrote:
> libgomp/ChangeLog
> 2015-07-03  Sebastian Huber  <sebastian.huber@embedded-brains.de>
> 
> 	* libgomp.h (gomp_thread_pool): Comment last_team field.
> ---
>  libgomp/libgomp.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
> index 5272f01..5ed0f78 100644
> --- a/libgomp/libgomp.h
> +++ b/libgomp/libgomp.h
> @@ -458,6 +458,9 @@ struct gomp_thread_pool
>    struct gomp_thread **threads;
>    unsigned threads_size;
>    unsigned threads_used;
> +  /* The last team is used for non-nested teams to delay their destruction to
> +     make sure all the threads in the team move on to the pool's barrier before
> +     the team's barrier is destroyed.  */
>    struct gomp_team *last_team;
>    /* Number of threads running in this contention group.  */
>    unsigned long threads_busy;
> -- 
> 1.8.4.5

Ok for trunk.

	Jakub
diff mbox

Patch

diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 5272f01..5ed0f78 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -458,6 +458,9 @@  struct gomp_thread_pool
   struct gomp_thread **threads;
   unsigned threads_size;
   unsigned threads_used;
+  /* The last team is used for non-nested teams to delay their destruction to
+     make sure all the threads in the team move on to the pool's barrier before
+     the team's barrier is destroyed.  */
   struct gomp_team *last_team;
   /* Number of threads running in this contention group.  */
   unsigned long threads_busy;