Ping x 2.
On 2016/1/5 11:22 PM, Chung-Lin Tang wrote:
> Patch has been updated to accommodate the gomp_fini_device() removal changes.
> And ping.
>
> On 2015/12/14 11:47 PM, Chung-Lin Tang wrote:
>> [sorry, forgot to C gcc-patches in last send]
>>
>> Hi Jakub,
>> these patches are a revision of
>> https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01701.html
>> since that patch set have bitrotten by now.
>>
>> To recap the original situation, due to the way that device locks are held
>> when entering plugin code, a GOMP_PLUGIN_fatal() call will deadlock when the
>> GOMP_unregister_var() exit destructor tries to obtain the same device lock.
>>
>> This patch set revises many functions on libgomp plugin interface to return
>> false on error,
>> and back to libgomp to release the lock and call gomp_fatal() there.
>>
>> This first patch is the changes for the machine independent libgomp proper.
>> The entire patch
>> set was tested without regressions. Is this okay for trunk?
>>
>> Thanks,
>> Chung-Lin
>>
>> 2015-12-14 Chung-Lin Tang <clt...@codesourcery.com>
>>
>> * target.c (gomp_device_copy): New function.
>> (gomp_copy_host2dev): Likewise.
>> (gomp_copy_dev2host): Likewise.
>> (gomp_free_device_memory): Likewise.
>> (gomp_map_vars_existing): Adjust to call gomp_copy_host2dev().
>> (gomp_map_pointer): Likewise.
>> (gomp_map_vars): Adjust to call gomp_copy_host2dev(), handle
>> NULL value from alloc_func plugin hook.
>> (gomp_unmap_tgt): Adjust to call gomp_free_device_memory().
>> (gomp_copy_from_async): Adjust to call gomp_copy_dev2host().
>> (gomp_unmap_vars): Likewise.
>> (gomp_update): Adjust to call gomp_copy_dev2host() and
>> gomp_copy_host2dev() functions.
>> (gomp_init_device): Handle false value from init_device_func
>> plugin hook.
>> (gomp_fini_device): Handle false value from fini_device_func
>> plugin hook.
>> (gomp_exit_data): Adjust to call gomp_copy_dev2host().
>> (omp_target_free): Adjust to call gomp_free_device_memory().
>> (omp_target_memcpy): Handle return values from host2dev_func,
>> dev2host_func, and dev2dev_func plugin hooks.
>> (omp_target_memcpy_rect_worker): Likewise.
>> * libgomp.h (struct gomp_device_descr): Adjust return type of
>> init_device_func, fini_device_func, free_func, dev2host_func,
>> host2dev_func, and dev2dev_func plugin hooks from 'void *' to
>> bool.
>> * oacc-host.c (host_init_device): Change return type to bool.
>> (host_fini_device): Likewise.
>> (host_free): Likewise.
>> (host_dev2host): Likewise.
>> (host_host2dev): Likewise.
>> * oacc-mem.c (acc_free): Handle plugin hook fatal error case.
>> (acc_memcpy_to_device): Likewise.
>> (acc_memcpy_from_device): Likewise.
>> (delete_copyout): Add libfnname parameter, handle free_func
>> hook fatal error case.
>> (acc_delete): Adjust delete_copyout call.
>> (acc_copyout): Likewise.
>>
>>
>>
>