FileHandle::{flock,get_flags} and DirHandle::get_flags, unix/fs.rs:143–190. The blocking lock is deliberately unavailable, exactly as in pinned Miri.
@[reducible, inline]
Instances For
- host {E : Type} (error : IoError.HostError E) : TryLockError E
- wouldBlock {E : Type} : TryLockError E
Instances For
- tryLock : H → Bool → M S (Except (TryLockError E) Unit)
- unlock : H → M S (Except (IoError.HostError E) Unit)
- fromKind : IoError.ErrorKind → M S (IoError.HostError E)
- libc : String → M S (Memory.Scalar Memory.Provenance)
Instances For
def
Miri.Interpreter.UnixFileOperations.flock
{S H E : Type}
(h : Hooks S H E)
(file : H)
(communicate : Bool)
(operation : LockOp)
:
M S (Except (IoError.HostError E) Unit)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.UnixFileOperations.fileFlags
{S H E : Type}
(h : Hooks S H E)
(readable writable : Bool)
:
Equations
- Miri.Interpreter.UnixFileOperations.fileFlags h true true = h.libc "O_RDWR"
- Miri.Interpreter.UnixFileOperations.fileFlags h true false = h.libc "O_RDONLY"
- Miri.Interpreter.UnixFileOperations.fileFlags h false true = h.libc "O_WRONLY"
- Miri.Interpreter.UnixFileOperations.fileFlags h false false = throw (Miri.Interpreter.StepError.invalidProgram "FileHandle flags unreachable path-only access")
Instances For
Equations
- Miri.Interpreter.UnixFileOperations.directoryFlags h = h.libc "O_RDONLY"
Instances For
def
Miri.Interpreter.UnixFileOperations.flockFd
{S F D P HM T E : Type}
(metadata : UnixFsMetadata.Hooks S F D P HM T E)
(communicate : Bool)
(operation : F → Bool → LockOp → M S (Except (IoError.HostError E) Unit))
(number flags : Int32)
:
unix/fd.rs::flock wrapper, including target constants after descriptor lookup.
Equations
- One or more equations did not get rendered due to their size.