Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
727dd08c
Commit
727dd08c
authored
Aug 16, 2013
by
Dmitriy Vyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix bug in fdMutex
Fixes #6165. R=golang-dev, r CC=golang-dev
https://golang.org/cl/12984044
parent
b6a8fa10
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fd_mutex.go
src/pkg/net/fd_mutex.go
+2
-2
No files found.
src/pkg/net/fd_mutex.go
View file @
727dd08c
...
...
@@ -98,7 +98,7 @@ func (mu *fdMutex) Decref() bool {
}
new
:=
old
-
mutexRef
if
atomic
.
CompareAndSwapUint64
(
&
mu
.
state
,
old
,
new
)
{
return
new
&
(
mutexClosed
|
mutexRef
)
==
mutexClosed
return
new
&
(
mutexClosed
|
mutexRef
Mask
)
==
mutexClosed
}
}
}
...
...
@@ -174,7 +174,7 @@ func (mu *fdMutex) RWUnlock(read bool) bool {
if
old
&
mutexMask
!=
0
{
runtime_Semrelease
(
mutexSema
)
}
return
new
&
(
mutexClosed
|
mutexRef
)
==
mutexClosed
return
new
&
(
mutexClosed
|
mutexRef
Mask
)
==
mutexClosed
}
}
}
...
...
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