aboutsummaryrefslogtreecommitdiff
path: root/libgomp/libgomp.h
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2019-12-13 23:14:15 +0000
committerJulian Brown <jules@gcc.gnu.org>2019-12-13 23:14:15 +0000
commit1cbd94e834d58100579847d35e899768c384dae0 (patch)
treec17d82d0dc67d657c321886da4f4691306c4f3a6 /libgomp/libgomp.h
parenta7c70129b9cb1cc9300400dc4f4adc639f0ba9c3 (diff)
downloadgcc-1cbd94e834d58100579847d35e899768c384dae0.zip
gcc-1cbd94e834d58100579847d35e899768c384dae0.tar.gz
gcc-1cbd94e834d58100579847d35e899768c384dae0.tar.bz2
Fix potential race condition in OpenACC "exit data" operations
PR libgomp/92881 libgomp/ * libgomp.h (gomp_remove_var_async): Add prototype. * oacc-mem.c (delete_copyout): Call gomp_remove_var_async instead of gomp_remove_var. * target.c (gomp_unref_tgt): Change return type to bool, indicating whether target_mem_desc was unmapped. (gomp_unref_tgt_void): New. (gomp_remove_var): Reimplement in terms of... (gomp_remove_var_internal): ...this new helper function. (gomp_remove_var_async): New, implemented using above helper function. (gomp_unmap_vars_internal): Use gomp_unref_tgt_void instead of gomp_unref_tgt. Reviewed-by: Thomas Schwinge <thomas@codesourcery.com> From-SVN: r279388
Diffstat (limited to 'libgomp/libgomp.h')
-rw-r--r--libgomp/libgomp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 9f4d042..36dcca2 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -1166,6 +1166,8 @@ extern bool gomp_fini_device (struct gomp_device_descr *);
extern void gomp_free_memmap (struct splay_tree_s *);
extern void gomp_unload_device (struct gomp_device_descr *);
extern bool gomp_remove_var (struct gomp_device_descr *, splay_tree_key);
+extern void gomp_remove_var_async (struct gomp_device_descr *, splay_tree_key,
+ struct goacc_asyncqueue *);
/* work.c */