1
0
mirror of https://github.com/golang/go synced 2024-10-04 20:11:22 -06:00
go/src/pkg/runtime/export_test.c
Russ Cox 439f9397fc runtime: avoid inconsistent goroutine state in profiler
Because profiling signals can arrive at any time, we must
handle the case where a profiling signal arrives halfway
through a goroutine switch. Luckily, although there is much
to think through, very little needs to change.

Fixes #6000.
Fixes #6015.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/13421048
2013-09-13 14:19:23 -04:00

14 lines
273 B
C

// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "runtime.h"
#include "arch_GOARCH.h"
void
·GogoBytes(int32 x)
{
x = RuntimeGogoBytes;
FLUSH(&x);
}