]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: Use atomic load for in entersyscall.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Apr 2016 00:47:53 +0000 (00:47 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Apr 2016 00:47:53 +0000 (00:47 +0000)
    Reportedly fixes PPC64 deadlock.

    From a comment by Gabriel Russell.

    Fixes golang/go#15051.

    Reviewed-on: https://go-review.googlesource.com/21450

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234694 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/MERGE
libgo/runtime/proc.c

index 07ae4d0f00c506bc0ce9505ca32cd97c3e894d08..d7f1dbc734d25ec8e7cded3efa89b9ec3d4c3a55 100644 (file)
@@ -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.
index 9ba199b8caea2f9c9ef95a219728af987dd442fd..c6ac972bd4100e7f5cf764a980287c69663af414 100644 (file)
@@ -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)