summaryrefslogtreecommitdiff
path: root/libgomp/target.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2015-07-17 17:12:01 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-07-17 17:12:01 +0000
commitebe4a560737e72aa508af4c0d9e1ac6e84a97655 (patch)
tree0620634b02bd3dbd3f65141af8fbb850d2590361 /libgomp/target.c
parent247577525613274ed246537f195eda285087d814 (diff)
downloadgcc-ebe4a560737e72aa508af4c0d9e1ac6e84a97655.tar.gz
mkoffload.c (process): Constify host data.
gcc/ * config/nvptx/mkoffload.c (process): Constify host data. * config/i386/intelmic-mkoffload.c (generate_target_descr_file): Constify host data. (generate_host_descr_file): Likewise. libgomp/ * target.c (struct_offload_image_descr): Constify host_table. (gomp_offload_image_to_device): Likewise. (GOMP_offload_register, GOMP_offload_unregister): Likewise. libgcc/ * offloadstuff.c: Constify host data. From-SVN: r225943
Diffstat (limited to 'libgomp/target.c')
-rw-r--r--libgomp/target.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libgomp/target.c b/libgomp/target.c
index b11c4f2fa6c..ca536a048d3 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -57,7 +57,7 @@ static gomp_mutex_t register_lock;
pointer to target data. */
struct offload_image_descr {
enum offload_target_type type;
- void *host_table;
+ const void *host_table;
const void *target_data;
};
@@ -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, const void *target_data,
+ const void *host_table, const void *target_data,
bool is_register_lock)
{
void **host_func_table = ((void ***) host_table)[0];
@@ -730,7 +730,8 @@ gomp_offload_image_to_device (struct gomp_device_descr *devicep,
the target, and TARGET_DATA needed by target plugin. */
void
-GOMP_offload_register (void *host_table, enum offload_target_type target_type,
+GOMP_offload_register (const void *host_table,
+ enum offload_target_type target_type,
const void *target_data)
{
int i;
@@ -764,7 +765,8 @@ GOMP_offload_register (void *host_table, enum offload_target_type target_type,
the target, and TARGET_DATA needed by target plugin. */
void
-GOMP_offload_unregister (void *host_table, enum offload_target_type target_type,
+GOMP_offload_unregister (const void *host_table,
+ enum offload_target_type target_type,
const void *target_data)
{
void **host_func_table = ((void ***) host_table)[0];