Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
00420f04
Commit
00420f04
authored
Mar 15, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: Move comment in handle.go
parent
03a74a9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
fuse/handle.go
fuse/handle.go
+5
-6
No files found.
fuse/handle.go
View file @
00420f04
...
@@ -8,10 +8,7 @@ import (
...
@@ -8,10 +8,7 @@ import (
)
)
// HandleMap translates objects in Go space to 64-bit handles that can
// HandleMap translates objects in Go space to 64-bit handles that can
// be given out to -say- the linux kernel. It uses the free bits on
// be given out to -say- the linux kernel.
// x64_64 (16+3) to do an extra sanity check on the data. (Thanks to
// Russ Cox for this suggestion). In addition, it stores the object
// in a map, so the Go runtime will not garbage collect it.
//
//
// The 32 bits version of this is a threadsafe wrapper around a map.
// The 32 bits version of this is a threadsafe wrapper around a map.
//
//
...
@@ -205,7 +202,10 @@ func newInt32HandleMap() *int32HandleMap {
...
@@ -205,7 +202,10 @@ func newInt32HandleMap() *int32HandleMap {
}
}
}
}
// 64 bits version of HandleMap
// 64 bits version of HandleMap. It uses the free bits on x64_64
// (16+3) to do an extra sanity check on the data. (Thanks to Russ
// Cox for this suggestion). In addition, it stores the object in a
// map, so the Go runtime will not garbage collect it.
type
int64HandleMap
struct
{
type
int64HandleMap
struct
{
mutex
sync
.
Mutex
mutex
sync
.
Mutex
handles
map
[
uint64
]
*
Handled
handles
map
[
uint64
]
*
Handled
...
@@ -309,7 +309,6 @@ func (m *int64HandleMap) Handle(obj *Handled) (handle uint64) {
...
@@ -309,7 +309,6 @@ func (m *int64HandleMap) Handle(obj *Handled) (handle uint64) {
func
(
m
*
int64HandleMap
)
Forget
(
handle
uint64
,
count
int
)
(
forgotten
bool
,
obj
*
Handled
)
{
func
(
m
*
int64HandleMap
)
Forget
(
handle
uint64
,
count
int
)
(
forgotten
bool
,
obj
*
Handled
)
{
defer
m
.
verify
()
defer
m
.
verify
()
obj
=
m
.
Decode
(
handle
)
obj
=
m
.
Decode
(
handle
)
m
.
mutex
.
Lock
()
m
.
mutex
.
Lock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment