Re: [PATCH] Tidy up locking for libgomp OpenACC entry points

2015-04-29 Thread Thomas Schwinge
Hi Julian! On Fri, 24 Apr 2015 18:13:08 +0100, Julian Brown jul...@codesourcery.com wrote: On Thu, 23 Apr 2015 18:41:34 +0200 Thomas Schwinge tho...@codesourcery.com wrote: On Wed, 22 Apr 2015 19:42:43 +0100, Julian Brown jul...@codesourcery.com wrote: This patch is an attempt to fix

Re: [PATCH] Tidy up locking for libgomp OpenACC entry points

2015-04-24 Thread Julian Brown
On Thu, 23 Apr 2015 18:41:34 +0200 Thomas Schwinge tho...@codesourcery.com wrote: Hi! On Wed, 22 Apr 2015 19:42:43 +0100, Julian Brown jul...@codesourcery.com wrote: This patch is an attempt to fix some potential race conditions with accesses to shared data structures from multiple

Re: [PATCH] Tidy up locking for libgomp OpenACC entry points

2015-04-23 Thread Thomas Schwinge
Hi! On Wed, 22 Apr 2015 19:42:43 +0100, Julian Brown jul...@codesourcery.com wrote: This patch is an attempt to fix some potential race conditions with accesses to shared data structures from multiple concurrent threads in libgomp's OpenACC entry points. The main change is to move locking out

Re: [PATCH] Tidy up locking for libgomp OpenACC entry points

2015-04-23 Thread Jakub Jelinek
On Wed, Apr 22, 2015 at 07:42:43PM +0100, Julian Brown wrote: @@ -120,25 +116,32 @@ acc_free (void *d) { splay_tree_key k; struct goacc_thread *thr = goacc_thread (); + struct gomp_device_descr *acc_dev = thr-dev; IMHO you want to move this line after: if (!d) return;

[PATCH] Tidy up locking for libgomp OpenACC entry points

2015-04-22 Thread Julian Brown
Hi, This patch is an attempt to fix some potential race conditions with accesses to shared data structures from multiple concurrent threads in libgomp's OpenACC entry points. The main change is to move locking out of lookup_host and lookup_dev in oacc-mem.c and into their callers (which can then