]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Async I/O - avoid unlocked unlocking [PR100352]
authorTobias Burnus <tobias@codesourcery.com>
Sun, 2 May 2021 16:16:17 +0000 (18:16 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Sun, 2 May 2021 16:16:17 +0000 (18:16 +0200)
commita13a50047ef1814a7bda2392f728bf28f81b17ce
treeb4c130466f28a5837bbd162afb72779ad513ba37
parent7911a905276781c20f704f5a91b5125e0184d072
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.
libgfortran/io/async.c
libgfortran/io/io.h
libgfortran/io/transfer.c