go race 源码

  • 2022-07-15
  • 浏览 (866)

golang race 代码

文件路径:/src/runtime/race/race.go

// Copyright 2012 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.

//go:build (race && linux && amd64) || (race && freebsd && amd64) || (race && netbsd && amd64) || (race && darwin && amd64) || (race && windows && amd64) || (race && linux && ppc64le) || (race && linux && arm64) || (race && darwin && arm64) || (race && openbsd && amd64) || (race && linux && s390x)

package race

// This file merely ensures that we link in runtime/cgo in race build,
// this in turn ensures that runtime uses pthread_create to create threads.
// The prebuilt race runtime lives in race_GOOS_GOARCH.syso.
// Calls to the runtime are done directly from src/runtime/race.go.

// void __race_unused_func(void);
import "C"

相关信息

go 源码目录

相关文章

go doc 源码

go output_test 源码

go race_linux_test 源码

go race_test 源码

go race_unix_test 源码

go race_windows_test 源码

go sched_test 源码

go syso_test 源码

go timer_test 源码

0  赞