runtime: change mcall to take a Go function value

For future work in bringing in the Go 1.8 GC, change the mcall
function to take a Go function value, which means that mcall can take
a closure rather than just a straight C function pointer.

As part of this change move kickoff from C to Go, which we want to do
anyhow so that we run the write barriers that it generates.

Change-Id: Ice5d2184e5c65d2949e60f7050514ff6d036c37c
Reviewed-by: Than McIntosh <>
6 files changed