MCPcopy Create free account
hub / github.com/Kitware/CMake / LockFile

Method LockFile

Source/cmFileLockUnix.cxx:67–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67int cmFileLock::LockFile(int cmd, int type) const
68{
69 struct ::flock lock;
70 lock.l_start = 0;
71 lock.l_len = 0; // lock all bytes
72 lock.l_pid = 0; // unused (for F_GETLK only)
73 lock.l_type = static_cast<short>(type); // exclusive lock
74 lock.l_whence = SEEK_SET;
75 return ::fcntl(this->File, cmd, &lock);
76}

Callers 3

ReleaseMethod · 0.95
LockWithoutTimeoutMethod · 0.95
LockWithTimeoutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected