From 7004605531a1b07223e3f0b70536067818bf7023 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 17 Jul 2015 14:07:53 +0000 Subject: gcc/ * config/nvptx/mkoffload.c (process): Constify target data. * config/i386/intelmic-mkoffload.c (generate_target_descr_file): Constify target data. (generate_target_offloadend_file): Likewise. libgomp/ * libgomp.h (gomp_device_descr): Constify target data arguments. * target.c (struct offload_image_descr): Constify target_data. (gomp_offload_image_to_device): Likewise. (GOMP_offload_register): Likewise. (GOMP_offload_unrefister): Likewise. * plugin/plugin-host.c (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Constify target data. * plugin/plugin-nvptx.c (struct ptx_image_data): Constify target data. (GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Likewise. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (ImgDevAddrMap): Constify. (offload_image, GOMP_OFFLOAD_load_image, OMP_OFFLOAD_unload_image): Constify target data. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225936 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/target.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libgomp/target.c') diff --git a/libgomp/target.c b/libgomp/target.c index 6e82792c819..b11c4f2fa6c 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -58,7 +58,7 @@ static gomp_mutex_t register_lock; struct offload_image_descr { enum offload_target_type type; void *host_table; - void *target_data; + const void *target_data; }; /* Array of descriptors of offload images. */ @@ -642,7 +642,7 @@ gomp_update (struct gomp_device_descr *devicep, size_t mapnum, void **hostaddrs, static void gomp_offload_image_to_device (struct gomp_device_descr *devicep, - void *host_table, void *target_data, + void *host_table, const void *target_data, bool is_register_lock) { void **host_func_table = ((void ***) host_table)[0]; @@ -731,7 +731,7 @@ gomp_offload_image_to_device (struct gomp_device_descr *devicep, void GOMP_offload_register (void *host_table, enum offload_target_type target_type, - void *target_data) + const void *target_data) { int i; gomp_mutex_lock (®ister_lock); @@ -765,7 +765,7 @@ GOMP_offload_register (void *host_table, enum offload_target_type target_type, void GOMP_offload_unregister (void *host_table, enum offload_target_type target_type, - void *target_data) + const void *target_data) { void **host_func_table = ((void ***) host_table)[0]; void **host_funcs_end = ((void ***) host_table)[1]; -- cgit v1.2.1