Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 105 for addUint32 (0.18 sec)

  1. src/vendor/golang.org/x/crypto/cryptobyte/builder.go

    // byte of the 32-bit input value is silently truncated.
    func (b *Builder) AddUint24(v uint32) {
    	b.add(byte(v>>16), byte(v>>8), byte(v))
    }
    
    // AddUint32 appends a big-endian, 32-bit value to the byte string.
    func (b *Builder) AddUint32(v uint32) {
    	b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
    }
    
    // AddUint48 appends a big-endian, 48-bit value to the byte string.
    func (b *Builder) AddUint48(v uint64) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  2. src/testing/benchmark_test.go

    	if testing.Short() {
    		t.Skip("skipping in short mode")
    	}
    	testing.Benchmark(func(b *testing.B) {
    		procs := uint32(0)
    		iters := uint64(0)
    		b.SetParallelism(3)
    		b.RunParallel(func(pb *testing.PB) {
    			atomic.AddUint32(&procs, 1)
    			for pb.Next() {
    				atomic.AddUint64(&iters, 1)
    			}
    		})
    		if want := uint32(3 * runtime.GOMAXPROCS(0)); procs != want {
    			t.Errorf("got %v procs, want %v", procs, want)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. internal/http/server.go

    			w.Header().Set(RetryAfter, "60")
    
    			w.WriteHeader(http.StatusServiceUnavailable)
    			w.Write([]byte(http.ErrServerClosed.Error()))
    			return
    		}
    
    		atomic.AddInt32(&srv.requestCount, 1)
    		defer atomic.AddInt32(&srv.requestCount, -1)
    
    		// Handle request using passed handler.
    		handler.ServeHTTP(w, r)
    	})
    
    	srv.listenerMutex.Lock()
    	srv.Handler = wrappedHandler
    	srv.listener = listener
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Feb 09 21:25:16 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  4. src/sync/atomic/type.go

    // Add atomically adds delta to x and returns the new value.
    func (x *Uint32) Add(delta uint32) (new uint32) { return AddUint32(&x.v, delta) }
    
    // And atomically performs a bitwise AND operation on x using the bitmask
    // provided as mask and returns the old value.
    func (x *Uint32) And(mask uint32) (old uint32) { return AndUint32(&x.v, mask) }
    
    // Or atomically performs a bitwise OR operation on x using the bitmask
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. src/cmd/cover/cover.go

    		if n.Name.Name == "_" || n.Body == nil {
    			return nil
    		}
    		fname := n.Name.Name
    		// Skip AddUint32 and StoreUint32 if we're instrumenting
    		// sync/atomic itself in atomic mode (out of an abundance of
    		// caution), since as part of the instrumentation process we
    		// add calls to AddUint32/StoreUint32, and we don't want to
    		// somehow create an infinite loop.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  6. src/sync/pool_test.go

    		if try == 1 && testing.Short() {
    			break
    		}
    		var fin, fin1 uint32
    		for i := 0; i < N; i++ {
    			v := new(string)
    			runtime.SetFinalizer(v, func(vv *string) {
    				atomic.AddUint32(&fin, 1)
    			})
    			p.Put(v)
    		}
    		if drain {
    			for i := 0; i < N; i++ {
    				p.Get()
    			}
    		}
    		for i := 0; i < 5; i++ {
    			runtime.GC()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. src/cmd/link/internal/loong64/asm.go

    	"debug/elf"
    	"log"
    )
    
    func gentext(ctxt *ld.Link, ldr *loader.Loader) {
    	initfunc, addmoduledata := ld.PrepareAddmoduledata(ctxt)
    	if initfunc == nil {
    		return
    	}
    
    	o := func(op uint32) {
    		initfunc.AddUint32(ctxt.Arch, op)
    	}
    
    	// Emit the following function:
    	//
    	//	local.dso_init:
    	//		la.pcrel $a0, local.moduledata
    	//		b runtime.addmoduledata
    
    	//	0000000000000000 <local.dso_init>:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 17:26:07 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go

    	b := cryptobyte.NewBuilder(nil)
    	b.AddUint32(uint32(encryptedDEKSourceType))
    	b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
    		b.AddBytes(encryptedDEKSource)
    	})
    	b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
    		b.AddBytes(toBytes(keyID))
    	})
    	if len(annotations) == 0 {
    		return b.Bytes()
    	}
    
    	// add the length of annotations to the cache key
    	b.AddUint32(uint32(len(annotations)))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 00:23:50 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go

    		var lookups uint32
    		c := make(chan struct{})
    		a := New(authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    			<-c
    			atomic.AddUint32(&lookups, 1)
    			return chewie, true, nil
    		}), true, time.Minute, 0)
    
    		var wg sync.WaitGroup
    		for i := 0; i < 10; i++ {
    			wg.Add(1)
    			go func() {
    				defer wg.Done()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  10. src/sync/map_test.go

    	// Set finalizers that count for collected keys. A non-zero count
    	// indicates that keys have not been leaked.
    	for atomic.LoadUint32(&finalized) == 0 {
    		p := new(int)
    		runtime.SetFinalizer(p, func(*int) {
    			atomic.AddUint32(&finalized, 1)
    		})
    		m.Store(p, struct{}{})
    		m.Delete(p)
    		runtime.GC()
    	}
    }
    
    func TestMapRangeNestedCall(t *testing.T) { // Issue 46399
    	var m sync.Map
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top