projects
/
gcc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
c++: Respect current_constraint_diagnosis_depth in diagnose_compound_requirement
[gcc.git]
/
libgomp
/
team.c
diff --git
a/libgomp/team.c
b/libgomp/team.c
index c422da3701df38c4d949cecf74b12dadbf387bf6..82f26a05687e7bf36ac11db17452573bfd2ef481 100644
(file)
--- a/
libgomp/team.c
+++ b/
libgomp/team.c
@@
-1,4
+1,4
@@
-/* Copyright (C) 2005-20
19
Free Software Foundation, Inc.
+/* Copyright (C) 2005-20
20
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU Offloading and Multi Processing Library
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU Offloading and Multi Processing Library
@@
-23,7
+23,7
@@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-/* This file handles the maint
aine
nce of threads in response to team
+/* This file handles the maint
ena
nce of threads in response to team
creation and termination. */
#include "libgomp.h"
creation and termination. */
#include "libgomp.h"
@@
-171,7
+171,7
@@
gomp_new_team (unsigned nthreads)
{
size_t extra = sizeof (team->ordered_release[0])
+ sizeof (team->implicit_task[0]);
{
size_t extra = sizeof (team->ordered_release[0])
+ sizeof (team->implicit_task[0]);
- team =
gomp
_malloc (sizeof (*team) + nthreads * extra);
+ team =
team
_malloc (sizeof (*team) + nthreads * extra);
#ifndef HAVE_SYNC_BUILTINS
gomp_mutex_init (&team->work_share_list_free_lock);
#ifndef HAVE_SYNC_BUILTINS
gomp_mutex_init (&team->work_share_list_free_lock);
@@
-221,7
+221,7
@@
free_team (struct gomp_team *team)
gomp_barrier_destroy (&team->barrier);
gomp_mutex_destroy (&team->task_lock);
priority_queue_free (&team->task_queue);
gomp_barrier_destroy (&team->barrier);
gomp_mutex_destroy (&team->task_lock);
priority_queue_free (&team->task_queue);
- free (team);
+
team_
free (team);
}
static void
}
static void
@@
-239,6
+239,9
@@
gomp_free_pool_helper (void *thread_pool)
pthread_exit (NULL);
#elif defined(__nvptx__)
asm ("exit;");
pthread_exit (NULL);
#elif defined(__nvptx__)
asm ("exit;");
+#elif defined(__AMDGCN__)
+ asm ("s_dcache_wb\n\t"
+ "s_endpgm");
#else
#error gomp_free_pool_helper must terminate the thread
#endif
#else
#error gomp_free_pool_helper must terminate the thread
#endif
@@
-282,8
+285,8
@@
gomp_free_thread (void *arg __attribute__((unused)))
if (pool->last_team)
free_team (pool->last_team);
#ifndef __nvptx__
if (pool->last_team)
free_team (pool->last_team);
#ifndef __nvptx__
- free (pool->threads);
- free (pool);
+
team_
free (pool->threads);
+
team_
free (pool);
#endif
thr->thread_pool = NULL;
}
#endif
thr->thread_pool = NULL;
}
@@
-1079,8
+1082,8
@@
gomp_pause_host (void)
if (pool->last_team)
free_team (pool->last_team);
#ifndef __nvptx__
if (pool->last_team)
free_team (pool->last_team);
#ifndef __nvptx__
- free (pool->threads);
- free (pool);
+
team_
free (pool->threads);
+
team_
free (pool);
#endif
thr->thread_pool = NULL;
}
#endif
thr->thread_pool = NULL;
}