Commit 427d1580 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Document lock function.

parent 542fa903
...@@ -163,7 +163,8 @@ type FileSystemConnector struct { ...@@ -163,7 +163,8 @@ type FileSystemConnector struct {
//////////////// ////////////////
// Protects the inodeMap and each node's Children map. // Protects the inodeMap and each node's Children/Parent
// relations.
treeLock sync.RWMutex treeLock sync.RWMutex
// Invariants: see the verify() method. // Invariants: see the verify() method.
...@@ -171,8 +172,10 @@ type FileSystemConnector struct { ...@@ -171,8 +172,10 @@ type FileSystemConnector struct {
rootNode *inode rootNode *inode
// Open files/directories. // Open files/directories.
fileLock sync.RWMutex
openFiles map[uint64]*interfaceBridge openFiles map[uint64]*interfaceBridge
// Protects openFiles and OpenCount in all of the nodes.
fileLock sync.RWMutex
} }
type interfaceBridge struct { type interfaceBridge struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment