]> git.ipfire.org Git - thirdparty/gcc.git/commit
runtime: implement cheaper context switch on Linux/AMD64
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 31 May 2019 17:56:36 +0000 (17:56 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 31 May 2019 17:56:36 +0000 (17:56 +0000)
commit4d12cf3cc3143843225ecdb0e5048fc7c37b1574
tree30d27f1ac980671a5b890c86e562a746f4f4b54e
parent34a13a521e3fc6f46fcaf2f158d20e66874e99fd
runtime: implement cheaper context switch on Linux/AMD64

    Currently, goroutine switches are implemented with libc
    getcontext/setcontext functions, which saves/restores the machine
    register states and also the signal context. This does more than
    what we need, and performs an expensive syscall.

    This CL implements a simplified version of getcontext/setcontext,
    in assembly, that only saves/restores the necessary part, i.e.
    the callee-save registers, and the PC, SP. A simplified version
    of makecontext, written in C, is also added. Currently this is
    only implemented on Linux/AMD64.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178298

From-SVN: r271818
gcc/go/gofrontend/MERGE
libgo/Makefile.am
libgo/Makefile.in
libgo/aclocal.m4
libgo/configure
libgo/configure.ac
libgo/runtime/go-context.S [new file with mode: 0644]
libgo/runtime/proc.c
libgo/runtime/runtime.h
libgo/testsuite/Makefile.in