flock mapped each call straight onto LockFileEx/UnlockFileEx, whose byte-range locks stack per handle. LOCK_UN without a lock failed with ERROR_NOT_LOCKED and aborted the process, a repeated LOCK_EX blocked forever, converting between shared and exclusive failed, and a repeated LOCK_SH needed as many unlocks. Track the one lock each descriptor holds: a repeated mode and LOCK_UN without a lock succeed, a conversion releases the old lock before taking the new one, and close forgets the descriptor's lock. |
||
|---|---|---|
| .. | ||
| DirectoryDescriptor.hpp | ||
| File.hpp | ||
| FileFlags.hpp | ||
| FileLock.hpp | ||
| NativeStat.hpp | ||
| WindowsFileTime.hpp | ||