projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af8fd1a
)
[OpenACC] Remove 'tgt' reference counting from 'acc_unmap_data' [PR92854]
author
Thomas Schwinge
<thomas@codesourcery.com>
Fri, 29 May 2020 12:12:16 +0000
(14:12 +0200)
committer
Thomas Schwinge
<thomas@codesourcery.com>
Thu, 4 Jun 2020 16:56:37 +0000
(18:56 +0200)
libgomp/
PR libgomp/92854
* oacc-mem.c (acc_unmap_data): Remove 'tgt' reference counting.
libgomp/oacc-mem.c
patch
|
blob
|
history
diff --git
a/libgomp/oacc-mem.c
b/libgomp/oacc-mem.c
index e2fb651a23349f42e61aea7c1f4eaaa9f6f6f53e..6314f5d8b686eacefdcb3a70b18cde688491de0d 100644
(file)
--- a/
libgomp/oacc-mem.c
+++ b/
libgomp/oacc-mem.c
@@
-477,13
+477,13
@@
acc_unmap_data (void *h)
gomp_mutex_unlock (&acc_dev->lock);
gomp_fatal ("cannot unmap target block");
}
- else if (tgt->refcount > 1)
- tgt->refcount--;
- else
- {
- free (tgt->array);
-
free (tgt
);
- }
+
+ /* Above, we've verified that the mapping must have been set up by
+ 'acc_map_data'. */
+ assert (tgt->refcount == 1);
+
+
free (tgt->array
);
+ free (tgt);
gomp_mutex_unlock (&acc_dev->lock);