diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-23 10:42:11 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-23 10:42:11 -0600 |
| commit | 0ba49bfbde242920d8675a193d7af89420456fc0 (patch) | |
| tree | 66bcdeb27cb744a026c245b296115e438aff40fe /vendor/github.com | |
| parent | 77afd54f19a5c7ad4417c4db687e257900b0e6c3 (diff) | |
| parent | f7335b090bc5b64d4d06014c4f7f5e34beb2c3cf (diff) | |
Merge branch 'go-1.24.3' into 'main'
Upgrade to Go 1.24.3
See merge request gitlab-org/software-supply-chain-security/authorization/sparkled!10
Diffstat (limited to 'vendor/github.com')
4 files changed, 38 insertions, 0 deletions
diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go index d229d84..e5a66f3 100644 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go @@ -19,6 +19,7 @@ var ( ) //go:nosplit +//go:norace func x_cgo_notify_runtime_init_done() { pthread_mutex_lock(&runtime_init_mu) runtime_init_done = 1 @@ -28,6 +29,8 @@ func x_cgo_notify_runtime_init_done() { // Store the g into a thread-specific value associated with the pthread key pthread_g. // And pthread_key_destructor will dropm when the thread is exiting. +// +//go:norace func x_cgo_bindm(g unsafe.Pointer) { // We assume this will always succeed, otherwise, there might be extra M leaking, // when a C thread exits after a cgo call. diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go index d17942e..d517024 100644 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go @@ -19,6 +19,7 @@ func setg_trampoline(setg uintptr, G uintptr) func call5(fn, a1, a2, a3, a4, a5 uintptr) uintptr //go:nosplit +//go:norace func malloc(size uintptr) unsafe.Pointer { ret := call5(mallocABI0, uintptr(size), 0, 0, 0, 0) // this indirection is to avoid go vet complaining about possible misuse of unsafe.Pointer @@ -26,96 +27,115 @@ func malloc(size uintptr) unsafe.Pointer { } //go:nosplit +//go:norace func free(ptr unsafe.Pointer) { call5(freeABI0, uintptr(ptr), 0, 0, 0, 0) } //go:nosplit +//go:norace func setenv(name *byte, value *byte, overwrite int32) int32 { return int32(call5(setenvABI0, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), uintptr(overwrite), 0, 0)) } //go:nosplit +//go:norace func unsetenv(name *byte) int32 { return int32(call5(unsetenvABI0, uintptr(unsafe.Pointer(name)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func sigfillset(set *sigset_t) int32 { return int32(call5(sigfillsetABI0, uintptr(unsafe.Pointer(set)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func nanosleep(ts *syscall.Timespec, rem *syscall.Timespec) int32 { return int32(call5(nanosleepABI0, uintptr(unsafe.Pointer(ts)), uintptr(unsafe.Pointer(rem)), 0, 0, 0)) } //go:nosplit +//go:norace func abort() { call5(abortABI0, 0, 0, 0, 0, 0) } //go:nosplit +//go:norace func pthread_attr_init(attr *pthread_attr_t) int32 { return int32(call5(pthread_attr_initABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_create(thread *pthread_t, attr *pthread_attr_t, start unsafe.Pointer, arg unsafe.Pointer) int32 { return int32(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(start), uintptr(arg), 0)) } //go:nosplit +//go:norace func pthread_detach(thread pthread_t) int32 { return int32(call5(pthread_detachABI0, uintptr(thread), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_sigmask(how sighow, ign *sigset_t, oset *sigset_t) int32 { return int32(call5(pthread_sigmaskABI0, uintptr(how), uintptr(unsafe.Pointer(ign)), uintptr(unsafe.Pointer(oset)), 0, 0)) } //go:nosplit +//go:norace func pthread_self() pthread_t { return pthread_t(call5(pthread_selfABI0, 0, 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_get_stacksize_np(thread pthread_t) size_t { return size_t(call5(pthread_get_stacksize_npABI0, uintptr(thread), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_attr_getstacksize(attr *pthread_attr_t, stacksize *size_t) int32 { return int32(call5(pthread_attr_getstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(stacksize)), 0, 0, 0)) } //go:nosplit +//go:norace func pthread_attr_setstacksize(attr *pthread_attr_t, size size_t) int32 { return int32(call5(pthread_attr_setstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(size), 0, 0, 0)) } //go:nosplit +//go:norace func pthread_attr_destroy(attr *pthread_attr_t) int32 { return int32(call5(pthread_attr_destroyABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_mutex_lock(mutex *pthread_mutex_t) int32 { return int32(call5(pthread_mutex_lockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_mutex_unlock(mutex *pthread_mutex_t) int32 { return int32(call5(pthread_mutex_unlockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_cond_broadcast(cond *pthread_cond_t) int32 { return int32(call5(pthread_cond_broadcastABI0, uintptr(unsafe.Pointer(cond)), 0, 0, 0, 0)) } //go:nosplit +//go:norace func pthread_setspecific(key pthread_key_t, value unsafe.Pointer) int32 { return int32(call5(pthread_setspecificABI0, uintptr(key), uintptr(value), 0, 0, 0)) } diff --git a/vendor/github.com/xlgmokha/x/pkg/x/iterate.go b/vendor/github.com/xlgmokha/x/pkg/x/iterate.go index 8394d1a..a1d40a1 100644 --- a/vendor/github.com/xlgmokha/x/pkg/x/iterate.go +++ b/vendor/github.com/xlgmokha/x/pkg/x/iterate.go @@ -1,5 +1,7 @@ package x +import "slices" + type Mapper[T any, K any] func(T) K type Predicate[T any] func(T) bool type Visitor[T any] func(T) @@ -51,3 +53,8 @@ func Inject[TInput any, TOutput any](items []TInput, memo TOutput, f func(TOutpu func Prepend[T any](rest []T, beginning ...T) []T { return append(beginning, rest...) } + +func Reverse[T any](items []T) []T { + slices.Reverse(items) + return items +} diff --git a/vendor/github.com/xlgmokha/x/pkg/x/middleware.go b/vendor/github.com/xlgmokha/x/pkg/x/middleware.go new file mode 100644 index 0000000..a24580a --- /dev/null +++ b/vendor/github.com/xlgmokha/x/pkg/x/middleware.go @@ -0,0 +1,8 @@ +package x + +func Middleware[T any](item T, items ...Option[T]) T { + for _, middleware := range Reverse(items) { + item = middleware(item) + } + return item +} |
