diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 483903d6d9b..1f687ebc92c 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -3292,3 +3292,23 @@ haveexperiment(int8 *name) } return 0; } + +#pragma textflag NOSPLIT +void +sync·runtime_procPin(intptr p) +{ + M *mp; + + mp = g->m; + // Disable preemption. + mp->locks++; + p = mp->p->id; + FLUSH(&p); +} + +#pragma textflag NOSPLIT +void +sync·runtime_procUnpin() +{ + g->m->locks--; +} diff --git a/src/pkg/runtime/runtime1.goc b/src/pkg/runtime/runtime1.goc index a95a4f944d6..9529d6504b6 100644 --- a/src/pkg/runtime/runtime1.goc +++ b/src/pkg/runtime/runtime1.goc @@ -114,15 +114,3 @@ func runtime∕pprof·runtime_cyclesPerSecond() (res int64) { res = runtime·tickspersecond(); } -func sync·runtime_procPin() (p int) { - M *mp; - - mp = g->m; - // Disable preemption. - mp->locks++; - p = mp->p->id; -} - -func sync·runtime_procUnpin() { - g->m->locks--; -}