diff options
| author | 2024-03-11 10:51:13 +0000 | |
|---|---|---|
| committer | 2024-03-11 10:51:13 +0000 | |
| commit | 8e88ee8d9c3740a76139566837199831dabdf997 (patch) | |
| tree | e331d9e0acfb1c975a72aee3105e0f1fba6ca128 /vendor/github.com/klauspost/compress/internal | |
| parent | [chore]: Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 (#2733) (diff) | |
| download | gotosocial-8e88ee8d9c3740a76139566837199831dabdf997.tar.xz | |
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.67 to 7.0.69 (#2748)
Diffstat (limited to 'vendor/github.com/klauspost/compress/internal')
| -rw-r--r-- | vendor/github.com/klauspost/compress/internal/race/norace.go | 13 | ||||
| -rw-r--r-- | vendor/github.com/klauspost/compress/internal/race/race.go | 26 |
2 files changed, 39 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/internal/race/norace.go b/vendor/github.com/klauspost/compress/internal/race/norace.go new file mode 100644 index 000000000..affbbbb59 --- /dev/null +++ b/vendor/github.com/klauspost/compress/internal/race/norace.go @@ -0,0 +1,13 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !race + +package race + +func ReadSlice[T any](s []T) { +} + +func WriteSlice[T any](s []T) { +} diff --git a/vendor/github.com/klauspost/compress/internal/race/race.go b/vendor/github.com/klauspost/compress/internal/race/race.go new file mode 100644 index 000000000..f5e240dcd --- /dev/null +++ b/vendor/github.com/klauspost/compress/internal/race/race.go @@ -0,0 +1,26 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build race + +package race + +import ( + "runtime" + "unsafe" +) + +func ReadSlice[T any](s []T) { + if len(s) == 0 { + return + } + runtime.RaceReadRange(unsafe.Pointer(&s[0]), len(s)*int(unsafe.Sizeof(s[0]))) +} + +func WriteSlice[T any](s []T) { + if len(s) == 0 { + return + } + runtime.RaceWriteRange(unsafe.Pointer(&s[0]), len(s)*int(unsafe.Sizeof(s[0]))) +} |
