1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/// @file WASM stub for pathlocks.cc
/// Path locking is not needed when store I/O goes through the Go host.
#include "lix/libstore/pathlocks.hh"
#include "lix/libutil/error.hh"
#include "lix/libutil/file-descriptor.hh"
namespace nix {
AutoCloseFD openLockFile(const Path &, bool)
{
return AutoCloseFD{};
}
void lockFile(int, LockType, NeverAsync) {}
bool tryLockFile(int, LockType)
{
return true;
}
void unlockFile(int) {}
std::optional<PathLock> tryLockPath(const Path &)
{
return std::nullopt;
}
std::optional<PathLocks> tryLockPaths(const PathSet &)
{
return std::nullopt;
}
std::optional<PathLock> lockPath(const Path &, NeverAsync)
{
return std::nullopt;
}
void PathLock::unlock() {}
} // namespace nix
|