[all-commits] [llvm/llvm-project] 102d86: Fix /tmp approach, and add environment variable me...

Terry Wilmarth via All-commits all-commits at lists.llvm.org
Wed Sep 13 11:53:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 102d864719153bb5d18a17926c536b66d258df38
      https://github.com/llvm/llvm-project/commit/102d864719153bb5d18a17926c536b66d258df38
  Author: Terry Wilmarth <terry.l.wilmarth at intel.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_runtime.cpp
    M openmp/runtime/src/z_Linux_util.cpp

  Log Message:
  -----------
  Fix /tmp approach, and add environment variable method as third fallback during library registration

The /tmp fallback for /dev/shm did not write to a fixed filename, so multiple instances of the runtime would not be able to detect each other. Now, we create the /tmp file in much the same way as the /dev/shm file was created, since mkstemp approach would not work to create a file that other instances of the runtime would detect. Also, add the environment variable method as a third fallback to /dev/shm and /tmp for library registration, as some systems do not have either. Also, add ability to fallback to a subsequent method should a failure occur during any part of the registration process. When unregistering, it is assumed that the method chosen during registration should work, so errors at that point are ignored. This also avoids a problem with multiple threads trying to unregister the library.




More information about the All-commits mailing list