diff options
Diffstat (limited to 'src/runtime/testdata/testprogcgo/threadprof.go')
| -rw-r--r-- | src/runtime/testdata/testprogcgo/threadprof.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/testdata/testprogcgo/threadprof.go b/src/runtime/testdata/testprogcgo/threadprof.go index 516f8dce9e..2d4c1039fb 100644 --- a/src/runtime/testdata/testprogcgo/threadprof.go +++ b/src/runtime/testdata/testprogcgo/threadprof.go @@ -2,7 +2,11 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// We only build this file with the tag "threadprof", since it starts +// a thread running a busy loop at constructor time. + // +build !plan9,!windows +// +build threadprof package main @@ -21,6 +25,7 @@ static void *thread1(void *p) { spinlock = 0; return NULL; } + __attribute__((constructor)) void issue9456() { pthread_t tid; pthread_create(&tid, 0, thread1, NULL); |
