aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/go.uber.org/atomic/uint32.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-08-23 23:07:40 +0100
committerGitHub <noreply@github.com>2021-08-23 18:07:40 -0400
commit1cd4a3b963946d27620c48eb968dc81e5af432af (patch)
treef8744b95a3b96e29f6fc0ac711288f39e4760cbd /vendor/go.uber.org/atomic/uint32.go
parentf31e7a67cfc9662af2ae2dab3f4687457545f60c (diff)
downloadgitea-1cd4a3b963946d27620c48eb968dc81e5af432af.tar.gz
gitea-1cd4a3b963946d27620c48eb968dc81e5af432af.zip
Update caddyserver/certmagic (#16789)
Fixes issue with windows users & letsencrypt Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'vendor/go.uber.org/atomic/uint32.go')
-rw-r--r--vendor/go.uber.org/atomic/uint32.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/go.uber.org/atomic/uint32.go b/vendor/go.uber.org/atomic/uint32.go
index 0b5173230c..7859a9cc3b 100644
--- a/vendor/go.uber.org/atomic/uint32.go
+++ b/vendor/go.uber.org/atomic/uint32.go
@@ -36,8 +36,8 @@ type Uint32 struct {
}
// NewUint32 creates a new Uint32.
-func NewUint32(i uint32) *Uint32 {
- return &Uint32{v: i}
+func NewUint32(val uint32) *Uint32 {
+ return &Uint32{v: val}
}
// Load atomically loads the wrapped value.
@@ -46,13 +46,13 @@ func (i *Uint32) Load() uint32 {
}
// Add atomically adds to the wrapped uint32 and returns the new value.
-func (i *Uint32) Add(n uint32) uint32 {
- return atomic.AddUint32(&i.v, n)
+func (i *Uint32) Add(delta uint32) uint32 {
+ return atomic.AddUint32(&i.v, delta)
}
// Sub atomically subtracts from the wrapped uint32 and returns the new value.
-func (i *Uint32) Sub(n uint32) uint32 {
- return atomic.AddUint32(&i.v, ^(n - 1))
+func (i *Uint32) Sub(delta uint32) uint32 {
+ return atomic.AddUint32(&i.v, ^(delta - 1))
}
// Inc atomically increments the wrapped uint32 and returns the new value.
@@ -66,18 +66,18 @@ func (i *Uint32) Dec() uint32 {
}
// CAS is an atomic compare-and-swap.
-func (i *Uint32) CAS(old, new uint32) bool {
+func (i *Uint32) CAS(old, new uint32) (swapped bool) {
return atomic.CompareAndSwapUint32(&i.v, old, new)
}
// Store atomically stores the passed value.
-func (i *Uint32) Store(n uint32) {
- atomic.StoreUint32(&i.v, n)
+func (i *Uint32) Store(val uint32) {
+ atomic.StoreUint32(&i.v, val)
}
// Swap atomically swaps the wrapped uint32 and returns the old value.
-func (i *Uint32) Swap(n uint32) uint32 {
- return atomic.SwapUint32(&i.v, n)
+func (i *Uint32) Swap(val uint32) (old uint32) {
+ return atomic.SwapUint32(&i.v, val)
}
// MarshalJSON encodes the wrapped uint32 into JSON.