Commit 0c59837c by Thomas Schwinge

[OpenACC] Remove 'tgt' reference counting from 'acc_unmap_data' [PR92854]

	libgomp/
	PR libgomp/92854
	* oacc-mem.c (acc_unmap_data): Remove 'tgt' reference counting.

(cherry picked from commit 4662f7fe7863b19fcc20ba58c22880f8d6661f3a)
parent 364f46de
...@@ -477,13 +477,13 @@ acc_unmap_data (void *h) ...@@ -477,13 +477,13 @@ acc_unmap_data (void *h)
gomp_mutex_unlock (&acc_dev->lock); gomp_mutex_unlock (&acc_dev->lock);
gomp_fatal ("cannot unmap target block"); gomp_fatal ("cannot unmap target block");
} }
else if (tgt->refcount > 1)
tgt->refcount--; /* Above, we've verified that the mapping must have been set up by
else 'acc_map_data'. */
{ assert (tgt->refcount == 1);
free (tgt->array);
free (tgt); free (tgt->array);
} free (tgt);
gomp_mutex_unlock (&acc_dev->lock); gomp_mutex_unlock (&acc_dev->lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment