Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
03986896
Commit
03986896
authored
Jan 22, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libgo: Adjust deadlock avoidance.
From-SVN: r169120
parent
2e8e58aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
libgo/runtime/go-go.c
+9
-9
No files found.
libgo/runtime/go-go.c
View file @
03986896
...
...
@@ -297,6 +297,15 @@ gc_stop_handler (int sig __attribute__ ((unused)))
{
struct
M
*
pm
=
m
;
if
(
__sync_bool_compare_and_swap
(
&
pm
->
holds_finlock
,
1
,
1
))
{
/* We can't interrupt the thread while it holds the finalizer
lock. Otherwise we can get into a deadlock when mark calls
runtime_walkfintab. */
__sync_bool_compare_and_swap
(
&
pm
->
gcing_for_finlock
,
0
,
1
);
return
;
}
if
(
__sync_bool_compare_and_swap
(
&
pm
->
mallocing
,
1
,
1
))
{
/* m->mallocing was already non-zero. We can't interrupt the
...
...
@@ -315,15 +324,6 @@ gc_stop_handler (int sig __attribute__ ((unused)))
return
;
}
if
(
__sync_bool_compare_and_swap
(
&
pm
->
holds_finlock
,
1
,
1
))
{
/* Similarly, we can't interrupt the thread while it holds the
finalizer lock. Otherwise we can get into a deadlock when
mark calls runtime_walkfintab. */
__sync_bool_compare_and_swap
(
&
pm
->
gcing_for_finlock
,
0
,
1
);
return
;
}
stop_for_gc
();
}
...
...
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