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
71108810
Commit
71108810
authored
Jan 12, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: fix bug in preemption checks; was causing "lock count" panics
R=r CC=golang-dev
https://golang.org/cl/186078
parent
9d4d7d8f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
malloc.cgo
src/pkg/runtime/malloc.cgo
+1
-1
proc.c
src/pkg/runtime/proc.c
+2
-0
No files found.
src/pkg/runtime/malloc.cgo
View file @
71108810
...
...
@@ -27,7 +27,7 @@ mallocgc(uintptr size, uint32 refflag, int32 dogc)
void *v;
uint32 *ref;
if(gcwaiting && g != m->g0)
if(gcwaiting && g != m->g0
&& m->locks == 0
)
gosched();
if(m->mallocing)
throw("malloc/free - deadlock");
...
...
src/pkg/runtime/proc.c
View file @
71108810
...
...
@@ -523,6 +523,8 @@ scheduler(void)
void
gosched
(
void
)
{
if
(
m
->
locks
!=
0
)
throw
(
"gosched holding locks"
);
if
(
g
==
m
->
g0
)
throw
(
"gosched of g0"
);
if
(
gosave
(
&
g
->
sched
)
==
0
)
...
...
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