Commit 911cef2e by Ian Lance Taylor

runtime: allow preemption in fast syscall return

    
    Let a fast syscall return be a preemption point.  This helps with
    tight loops that make system calls, as in BenchmarkSyscallExcessWork.
    
    Reviewed-on: https://go-review.googlesource.com/94895

From-SVN: r257848
parent 9bd958c5
459a8a94e04a19bde7173ef7cf2db369c2e62e2d c6e0970f75508e209a10a7db5164d6ea3f9b28bf
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -2794,6 +2794,13 @@ func exitsyscall(dummy int32) { ...@@ -2794,6 +2794,13 @@ func exitsyscall(dummy int32) {
exitsyscallclear(_g_) exitsyscallclear(_g_)
_g_.m.locks-- _g_.m.locks--
_g_.throwsplit = false _g_.throwsplit = false
// Check preemption, since unlike gc we don't check on
// every call.
if getg().preempt {
checkPreempt()
}
return return
} }
......
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