Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
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
Kirill Smelkov
go
Commits
19c18358
Commit
19c18358
authored
Dec 14, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: in exitsyscall, avoid confusing garbage collector
R=r CC=golang-dev
https://golang.org/cl/178046
parent
31de4d4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/pkg/runtime/proc.c
src/pkg/runtime/proc.c
+6
-1
No files found.
src/pkg/runtime/proc.c
View file @
19c18358
...
@@ -566,14 +566,19 @@ runtime·exitsyscall(void)
...
@@ -566,14 +566,19 @@ runtime·exitsyscall(void)
unlock
(
&
sched
);
unlock
(
&
sched
);
return
;
return
;
}
}
g
->
status
=
Grunning
;
sched
.
msyscall
--
;
sched
.
msyscall
--
;
sched
.
mcpu
++
;
sched
.
mcpu
++
;
// Fast path - if there's room for this m, we're done.
// Fast path - if there's room for this m, we're done.
if
(
sched
.
mcpu
<=
sched
.
mcpumax
)
{
if
(
sched
.
mcpu
<=
sched
.
mcpumax
)
{
g
->
status
=
Grunning
;
unlock
(
&
sched
);
unlock
(
&
sched
);
return
;
return
;
}
}
// Tell scheduler to put g back on the run queue:
// mostly equivalent to g->status = Grunning,
// but keeps the garbage collector from thinking
// that g is running right now, which it's not.
g
->
readyonstop
=
1
;
unlock
(
&
sched
);
unlock
(
&
sched
);
// Slow path - all the cpus are taken.
// Slow path - all the cpus are taken.
...
...
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