Commit bb727032 by Ian Lance Taylor

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
parent 2e816b99
3de822d11255d439fac9717897b017aae2de18c2
8edf085a94579bd819a10f50328233812ceeb950
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment