• David Crawshaw's avatar
    runtime: use sched_yield instead of pthread_yield · ed915ad4
    David Crawshaw authored
    Attempt to fix the linux-amd64-clang builder, which broke
    with CL 29472.
    
    Turns out pthread_yield is a non-portable Linux function, and
    should have #define _GNU_SOURCE before #include <pthread.h>.
    GCC doesn't complain about this, but Clang does:
    
    	./raceprof.go:44:3: warning: implicit declaration of function 'pthread_yield' is invalid in C99 [-Wimplicit-function-declaration]
    
    (Though the error, while explicable, certainly could be clearer.)
    
    There is a portable POSIX equivalent, sched_yield, so this
    CL uses it instead.
    
    Change-Id: I58ca7a3f73a2b3697712fdb02e72a8027c391169
    Reviewed-on: https://go-review.googlesource.com/29675
    Run-TryBot: David Crawshaw <crawshaw@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    ed915ad4
Name
Last commit
Last update
..
windows Loading commit data...
aprof.go Loading commit data...
callback.go Loading commit data...
cgo.go Loading commit data...
crash.go Loading commit data...
deadlock.go Loading commit data...
dll_windows.go Loading commit data...
dropm.go Loading commit data...
dropm_stub.go Loading commit data...
exec.go Loading commit data...
main.go Loading commit data...
pprof.go Loading commit data...
raceprof.go Loading commit data...
threadpanic.go Loading commit data...
threadpanic_unix.c Loading commit data...
threadpanic_windows.c Loading commit data...
threadpprof.go Loading commit data...
threadprof.go Loading commit data...
traceback.go Loading commit data...
tracebackctxt.go Loading commit data...
tracebackctxt_c.c Loading commit data...