diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-04-02 00:47:53 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-04-02 00:47:53 +0000 |
commit | bb727032821479aaa585a779b7c1d6c74822e0de (patch) | |
tree | 5a36e29e7fb33bb94de5f242fe097b031bbc1d4c | |
parent | 2e816b993d730e1ea5f7d9203be8dd1038f8574b (diff) | |
download | gcc-bb727032821479aaa585a779b7c1d6c74822e0de.zip gcc-bb727032821479aaa585a779b7c1d6c74822e0de.tar.gz gcc-bb727032821479aaa585a779b7c1d6c74822e0de.tar.bz2 |
runtime: Use atomic load for in entersyscall.
Reportedly fixes PPC64 deadlock.
From a comment by Gabriel Russell.
Fixes golang/go#15051.
Reviewed-on: https://go-review.googlesource.com/21450
From-SVN: r234694
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | libgo/runtime/proc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 07ae4d0..d7f1dbc 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -3de822d11255d439fac9717897b017aae2de18c2 +8edf085a94579bd819a10f50328233812ceeb950 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 9ba199b..c6ac972 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -2042,7 +2042,7 @@ doentersyscall() m->mcache = nil; m->p->m = nil; runtime_atomicstore(&m->p->status, Psyscall); - if(runtime_sched.gcwaiting) { + if(runtime_atomicload(&runtime_sched.gcwaiting)) { runtime_lock(&runtime_sched); if (runtime_sched.stopwait > 0 && runtime_cas(&m->p->status, Psyscall, Pgcstop)) { if(--runtime_sched.stopwait == 0) |