Re: libgomp: Guard all devices/num_devices/num_devices_openmp access by register_lock

2015-10-09 Thread Ilya Verbin
On Fri, Oct 09, 2015 at 13:58:32 +0200, Bernd Schmidt wrote: > One oddity I noticed in target.c is that there are two different num_devices > variables: > > /* Total number of available devices. */ > static int num_devices; > > /* Number of GOMP_OFFLOAD_CAP_OPENMP_400 devices. */ > stat

Re: libgomp: Guard all devices/num_devices/num_devices_openmp access by register_lock

2015-10-09 Thread Bernd Schmidt
On 09/28/2015 10:52 AM, Thomas Schwinge wrote: On Fri, 25 Sep 2015 19:49:50 +0300, Ilya Verbin wrote: Looks like you're right, and this scenario is possible. Thanks for your review! Jakub, OK to commit the patch I had posted? Then, in context of a similar scenario, I think we'll also want

Re: libgomp: Guard all devices/num_devices/num_devices_openmp access by register_lock (was: libgomp: Guard all offload_images/num_offload_images access by register_lock)

2015-10-06 Thread Thomas Schwinge
tch I had posted? Ping. And, likewise, ping for the following: > Then, in context of a similar scenario, I think we'll also want the > following. Please confirm that my reasoning in gomp_get_num_devices and > resolve_device is correct. OK for trunk? > > commit b0cf4dcc588

libgomp: Guard all devices/num_devices/num_devices_openmp access by register_lock (was: libgomp: Guard all offload_images/num_offload_images access by register_lock)

2015-09-28 Thread Thomas Schwinge
scenario is possible. Thanks for your review! Jakub, OK to commit the patch I had posted? Then, in context of a similar scenario, I think we'll also want the following. Please confirm that my reasoning in gomp_get_num_devices and resolve_device is correct. OK for trunk? commit b0cf4dcc588e432c0a0d19d85727