1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build aix || dragonfly || freebsd || linux || netbsd || solaris
6 // +build aix dragonfly freebsd linux netbsd solaris
11 extern int __thread tlsvar;
12 int *getTLS() { return &tlsvar; }
17 if v := *C.getTLS(); v != 12345 {
19 panic("BAD TLS value")