diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-02-23 22:36:54 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-02-23 22:36:54 +0000 |
commit | 88a3ea34080ad3087a8191fbf479543153175d59 (patch) | |
tree | 34eaec34d3588e09f9a77abba776266f124dc823 /libgo/go/runtime/proc.go | |
parent | 25e15aaed275cdfef34b3ee6eb3cb4b43a48d44f (diff) | |
parent | e65055a558093bd4fc0b1b0024b7814cc187b8e8 (diff) | |
download | gcc-88a3ea34080ad3087a8191fbf479543153175d59.tar.gz |
Merge from trunk revision 257954.gccgo
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gccgo@257955 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/runtime/proc.go')
-rw-r--r-- | libgo/go/runtime/proc.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libgo/go/runtime/proc.go b/libgo/go/runtime/proc.go index edf41405c1c..20fa0ad05be 100644 --- a/libgo/go/runtime/proc.go +++ b/libgo/go/runtime/proc.go @@ -2794,6 +2794,13 @@ func exitsyscall(dummy int32) { exitsyscallclear(_g_) _g_.m.locks-- _g_.throwsplit = false + + // Check preemption, since unlike gc we don't check on + // every call. + if getg().preempt { + checkPreempt() + } + return } @@ -4084,8 +4091,9 @@ func preemptone(_p_ *p) bool { // setting a global variable and figuring out a way to efficiently // check that global variable. // - // For now we check gp.preempt in schedule and mallocgc, - // which is at least better than doing nothing at all. + // For now we check gp.preempt in schedule, mallocgc, selectgo, + // and a few other places, which is at least better than doing + // nothing at all. return true } |