• Ian Lance Taylor's avatar
    runtime/cgo: retry pthread_create on EAGAIN for OpenBSD · 80acfe95
    Ian Lance Taylor authored
    For reasons that I do not know, OpenBSD does not call pthread_create
    directly, but instead looks it up in libpthread.so. That means that we
    can't use the code used on other systems to retry pthread_create on
    EAGAIN, since that code simply calls pthread_create.
    
    This patch copies that code to an OpenBSD-specific version.
    
    Also, check for an EAGAIN failure in the test, as that seems to be the
    underlying cause of the test failure on several systems including OpenBSD.
    
    Fixes #18146.
    
    Change-Id: I3bceaa1e03a7eaebc2da19c9cc146b25b59243ef
    Reviewed-on: https://go-review.googlesource.com/33905
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    80acfe95
gcc_openbsd_amd64.c 4.71 KB