aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/testdata')
-rw-r--r--src/runtime/testdata/testprogcgo/raceprof.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/testdata/testprogcgo/raceprof.go b/src/runtime/testdata/testprogcgo/raceprof.go
index 8f50a8a425..fe624c541f 100644
--- a/src/runtime/testdata/testprogcgo/raceprof.go
+++ b/src/runtime/testdata/testprogcgo/raceprof.go
@@ -15,6 +15,7 @@ package main
#include <signal.h>
#include <stdint.h>
#include <pthread.h>
+#include <sched.h>
struct cgoTracebackArg {
uintptr_t context;
@@ -41,7 +42,7 @@ static void* raceprofThread(void* p) {
for (i = 0; i < 100; i++) {
pthread_kill(pthread_self(), SIGPROF);
- pthread_yield();
+ sched_yield();
}
return 0;
}