[all-commits] [llvm/llvm-project] 00a1c6: [flang] Restore old unit locking behavior

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Dec 8 08:35:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00a1c6d036328db46c20cda88edb020ddbda05b4
      https://github.com/llvm/llvm-project/commit/00a1c6d036328db46c20cda88edb020ddbda05b4
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M flang/runtime/lock.h
    M flang/runtime/unit.cpp
    M flang/runtime/unit.h

  Log Message:
  -----------
  [flang] Restore old unit locking behavior

Rework  the recursive I/O error check on I/O units so that
threads again hold a lock on a unit throughout an I/O statement.
Add an API to the runtime's Lock class implementation for pthreads
to allow detection of solf-deadlock without depending on EDEADLK
or recursive mutexes.

This should fix I/O from OpenMP threads.

Differential Revision: https://reviews.llvm.org/D139477




More information about the All-commits mailing list