Merge pull request #23 from tpng/patch-1

atomic requires struct field to be 64-bit aligned
This commit is contained in:
Martin Bertschler 2015-11-26 08:07:36 +01:00
commit 12fcb8c83d
1 changed files with 10 additions and 8 deletions

View File

@ -34,16 +34,18 @@ type MemDir interface {
} }
type InMemoryFile struct { type InMemoryFile struct {
sync.Mutex // atomic requires 64-bit alignment for struct field access
at int64 at int64
name string
data []byte
memDir MemDir
dir bool
closed bool
mode os.FileMode
modtime time.Time
readDirCount int64 readDirCount int64
sync.Mutex
name string
data []byte
memDir MemDir
dir bool
closed bool
mode os.FileMode
modtime time.Time
} }
func MemFileCreate(name string) *InMemoryFile { func MemFileCreate(name string) *InMemoryFile {