diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2021-05-02 18:16:17 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2021-05-02 18:16:17 +0200 |
commit | a13a50047ef1814a7bda2392f728bf28f81b17ce (patch) | |
tree | b4c130466f28a5837bbd162afb72779ad513ba37 /libgfortran/io/async.c | |
parent | 7911a905276781c20f704f5a91b5125e0184d072 (diff) | |
download | gcc-a13a50047ef1814a7bda2392f728bf28f81b17ce.tar.gz |
Fortran: Async I/O - avoid unlocked unlocking [PR100352]
Follow up to PR100352, which moved unit unlocking to st_*_done_worker to
avoid lock order reversal; however, as async_io uses a different lock,
the (unlocked locked) unit lock shall not be unlocked there.
libgfortran/ChangeLog:
PR libgomp/100352
* io/transfer.c (st_read_done_worker, st_write_done_worker): Add new
arg whether to unlock unit.
(st_read_done, st_write_done): Call it with true.
* io/async.c (async_io): Call it with false.
* io/io.h (st_write_done_worker, st_read_done_worker): Update prototype.
Diffstat (limited to 'libgfortran/io/async.c')
-rw-r--r-- | libgfortran/io/async.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/async.c b/libgfortran/io/async.c index d216ace1947..247008ca801 100644 --- a/libgfortran/io/async.c +++ b/libgfortran/io/async.c @@ -117,13 +117,13 @@ async_io (void *arg) { case AIO_WRITE_DONE: NOTE ("Finalizing write"); - st_write_done_worker (au->pdt); + st_write_done_worker (au->pdt, false); UNLOCK (&au->io_lock); break; case AIO_READ_DONE: NOTE ("Finalizing read"); - st_read_done_worker (au->pdt); + st_read_done_worker (au->pdt, false); UNLOCK (&au->io_lock); break; |