From a3b80b56df223a5757cf85c0b50fe8fbe9459657 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Fri, 3 Dec 2021 11:27:49 +0100 Subject: [PATCH] [PATCH 82/90] rename free_chunk() to pocl_free_chunk() Gbp-Pq: Name 0082-rename-free_chunk-to-pocl_free_chunk.patch --- lib/CL/devices/accel/accel.cc | 2 +- lib/CL/devices/bufalloc.c | 4 ++-- lib/CL/devices/bufalloc.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/CL/devices/accel/accel.cc b/lib/CL/devices/accel/accel.cc index c04fbd9..d64db3a 100644 --- a/lib/CL/devices/accel/accel.cc +++ b/lib/CL/devices/accel/accel.cc @@ -410,7 +410,7 @@ void pocl_accel_free(cl_device_id device, cl_mem mem) { mem->size, chunk->start_address); assert(chunk != NULL); - free_chunk (chunk); + pocl_free_chunk(chunk); p->mem_ptr = NULL; p->version = 0; diff --git a/lib/CL/devices/bufalloc.c b/lib/CL/devices/bufalloc.c index 0a063a6..54007a0 100644 --- a/lib/CL/devices/bufalloc.c +++ b/lib/CL/devices/bufalloc.c @@ -374,7 +374,7 @@ free_buffer (memory_region_t *regions, memory_address_t addr) * form larger unallocated chunks. */ void -free_chunk (chunk_info_t* chunk) +pocl_free_chunk (chunk_info_t *chunk) { memory_region_t *region = chunk->parent_region; BA_LOCK (region->lock); @@ -385,7 +385,7 @@ free_chunk (chunk_info_t* chunk) BA_UNLOCK (region->lock); #ifdef DEBUG_BUFALLOC - printf ("#### after free_chunk (%x)\n", chunk); + printf ("#### after pocl_free_chunk (%x)\n", chunk); print_chunks (region->chunks); printf ("\n"); #endif diff --git a/lib/CL/devices/bufalloc.h b/lib/CL/devices/bufalloc.h index 6f70c9d..0639dec 100644 --- a/lib/CL/devices/bufalloc.h +++ b/lib/CL/devices/bufalloc.h @@ -152,7 +152,8 @@ chunk_info_t *pocl_alloc_buffer_from_region (memory_region_t *region, chunk_info_t *alloc_buffer(memory_region_t *regions, size_t size); memory_region_t *free_buffer (memory_region_t *regions, memory_address_t addr); -void free_chunk(chunk_info_t* chunk); +POCL_EXPORT +void pocl_free_chunk (chunk_info_t *chunk); void init_mem_region ( memory_region_t *region, memory_address_t start, size_t size); -- 2.30.2