On 1/4/26 11:23 AM, Thomas Koenig wrote:
Hello world,
the attached patch hijacks Jerry's version and adds logic which
should make everything thread-safe. (Jerry, I hope you don't mind
this).
The rest is in the ChangeLog and in the comments.
OK for trunk?
Best regards
Thomas
Generate a runtime error on recursive I/O, thread-safe
This patch is a version of Jerry's patch with one additional feature.
When locking a unit, the thread ID of the locking thread also stored
in the gfc_unit structure. When the unit is found to be locked, it can
be either have been locked by the same thread (bad, recursive I/O) or
by another thread (harmless).
Regression-tested fully (make -j8 check in the gcc build directory) on
Linux, which links in pthreads by default. Steve checked on FreeBSD,
which does not do so.
OK for trunk?
Hi Thomas,
This looks good on my end. OK for trunk.
Thanks for stepping in. Good teamwork.
Jerry