llvm / llvm/llvm-project

LLVMCAS implementation requires `flock` on UNIX

Open
#165,327 0 comments 0 reactions 1 assignee Claimed by @cachemeifyoucan View on GitHub
llvm:CAS
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

LLVMCAS is currently disabled on UNIX platforms that do not have a `flock` implementation. `flock` is currently the only non-POSIX API required for LLVM CAS implementation. It is chosen over the POSIX file locks because `flock` locks the file instead of the process, which makes the file lock doubled as a in-process read/writer lock.

Without flock, LLVMCAS needs to only allow one LLVMCAS instance at the same location in one process. Open the same CAS twice in the same process is an error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.