mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-08 16:50:12 +08:00
chore: upgrade go mod library
This commit is contained in:
11
vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go
generated
vendored
11
vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go
generated
vendored
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
|
||||
|
||||
//go:build darwin || freebsd || linux
|
||||
//go:build !cgo && (darwin || freebsd || linux)
|
||||
|
||||
package fakecgo
|
||||
|
||||
@@ -50,9 +50,11 @@ func _cgo_try_pthread_create(thread *pthread_t, attr *pthread_attr_t, pfn unsafe
|
||||
var err int
|
||||
|
||||
for tries = 0; tries < 20; tries++ {
|
||||
err = int(pthread_create(thread, attr, pfn, unsafe.Pointer(arg)))
|
||||
// inlined this call because it ran out of stack when inlining was disabled
|
||||
err = int(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(pfn), uintptr(unsafe.Pointer(arg)), 0))
|
||||
if err == 0 {
|
||||
pthread_detach(*thread)
|
||||
// inlined this call because it ran out of stack when inlining was disabled
|
||||
call5(pthread_detachABI0, uintptr(*thread), 0, 0, 0, 0)
|
||||
return 0
|
||||
}
|
||||
if err != int(syscall.EAGAIN) {
|
||||
@@ -60,7 +62,8 @@ func _cgo_try_pthread_create(thread *pthread_t, attr *pthread_attr_t, pfn unsafe
|
||||
}
|
||||
ts.Sec = 0
|
||||
ts.Nsec = (tries + 1) * 1000 * 1000 // Milliseconds.
|
||||
nanosleep(&ts, nil)
|
||||
// inlined this call because it ran out of stack when inlining was disabled
|
||||
call5(nanosleepABI0, uintptr(unsafe.Pointer(&ts)), 0, 0, 0, 0)
|
||||
}
|
||||
return int(syscall.EAGAIN)
|
||||
}
|
||||
|
Reference in New Issue
Block a user