Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,357 for atomics (0.37 sec)

  1. test/escape_runtime_atomic.go

    // Test escape analysis for internal/runtime/atomic.
    
    package escape
    
    import (
    	"internal/runtime/atomic"
    	"unsafe"
    )
    
    // BAD: should always be "leaking param: addr to result ~r0 level=1$".
    func Loadp(addr unsafe.Pointer) unsafe.Pointer { // ERROR "leaking param: addr( to result ~r0 level=1)?$"
    	return atomic.Loadp(addr)
    }
    
    var ptr unsafe.Pointer
    
    func Storep() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 874 bytes
    - Viewed (0)
  2. src/runtime/runtime1.go

    	if atomic.Load64(&test_z64) != (1<<40)+1 {
    		throw("store64 failed")
    	}
    	if atomic.Xadd64(&test_z64, (1<<40)+1) != (2<<40)+2 {
    		throw("xadd64 failed")
    	}
    	if atomic.Load64(&test_z64) != (2<<40)+2 {
    		throw("xadd64 failed")
    	}
    	if atomic.Xchg64(&test_z64, (3<<40)+3) != (2<<40)+2 {
    		throw("xchg64 failed")
    	}
    	if atomic.Load64(&test_z64) != (3<<40)+3 {
    		throw("xchg64 failed")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  3. internal/config/lambda/target/lazyinit.go

    package target
    
    import (
    	"sync"
    	"sync/atomic"
    )
    
    // Inspired from Golang sync.Once but it is only marked
    // initialized when the provided function returns nil.
    
    type lazyInit struct {
    	done uint32
    	m    sync.Mutex
    }
    
    func (l *lazyInit) Do(f func() error) error {
    	if atomic.LoadUint32(&l.done) == 0 {
    		return l.doSlow(f)
    	}
    	return nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 07 16:12:41 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/fakes_test.go

    	return &fakeFileFakeFds{File: f, fd: 0}
    }
    
    type fakeIptablesDeps struct {
    	AddRouteErr           error
    	AddInpodMarkIPRuleCnt atomic.Int32
    	DelInpodMarkIPRuleCnt atomic.Int32
    	AddLoopbackRoutesCnt  atomic.Int32
    	DelLoopbackRoutesCnt  atomic.Int32
    }
    
    var _ iptables.NetlinkDependencies = &fakeIptablesDeps{}
    
    func (r *fakeIptablesDeps) AddInpodMarkIPRule(cfg *iptables.Config) error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. internal/logger/target/kafka/kafka.go

    func (h *Target) Stats() types.TargetStats {
    	h.logChMu.RLock()
    	queueLength := len(h.logCh)
    	h.logChMu.RUnlock()
    
    	return types.TargetStats{
    		TotalMessages:  atomic.LoadInt64(&h.totalMessages),
    		FailedMessages: atomic.LoadInt64(&h.failedMessages),
    		QueueLength:    queueLength,
    	}
    }
    
    // Init initialize kafka target
    func (h *Target) Init(ctx context.Context) error {
    	if !h.kconfig.Enabled {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jun 02 03:03:39 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  6. cmd/http-stats.go

    	serverStats := ServerHTTPStats{}
    	serverStats.S3RequestsIncoming = atomic.SwapUint64(&st.s3RequestsIncoming, 0)
    	serverStats.S3RequestsInQueue = atomic.LoadInt32(&st.s3RequestsInQueue)
    	serverStats.TotalS3RejectedAuth = atomic.LoadUint64(&st.rejectedRequestsAuth)
    	serverStats.TotalS3RejectedTime = atomic.LoadUint64(&st.rejectedRequestsTime)
    	serverStats.TotalS3RejectedHeader = atomic.LoadUint64(&st.rejectedRequestsHeader)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 06:25:13 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/issue9400/gccgo.go

    package issue9400
    
    import (
    	"runtime"
    	"sync/atomic"
    )
    
    // The test for the gc compiler resets the stack pointer so that the
    // stack gets modified.  We don't have a way to do that for gccgo
    // without writing more assembly code, which we haven't bothered to
    // do.  So this is not much of a test.
    
    var Baton int32
    
    func RewindAndSetgid() {
    	atomic.StoreInt32(&Baton, 1)
    	for atomic.LoadInt32(&Baton) != 0 {
    		runtime.Gosched()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 612 bytes
    - Viewed (0)
  8. test/fixedbugs/issue11256.go

    			var buf [1024]byte
    			buf[0]++
    			for atomic.LoadInt32(&done) == 0 {
    				runtime.Gosched()
    			}
    			atomic.StoreInt32(&done, 0)
    			// Exit without unwinding stack barriers.
    			runtime.Goexit()
    		}()
    
    		// Generate some garbage.
    		x[i] = make([]byte, 1024*1024)
    
    		// Give GC some time to install stack barriers in the G.
    		time.Sleep(50 * time.Microsecond)
    		atomic.StoreInt32(&done, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 29 15:02:30 UTC 2015
    - 1.1K bytes
    - Viewed (0)
  9. src/internal/runtime/atomic/doc.go

    // Copyright 2021 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.
    
    /*
    Package atomic provides atomic operations, independent of sync/atomic,
    to the runtime.
    
    On most platforms, the compiler is aware of the functions defined
    in this package, and they're replaced with platform-specific intrinsics.
    On other platforms, generic implementations are made available.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 771 bytes
    - Viewed (0)
  10. src/runtime/sigqueue.go

    // as there is no connection between handling a signal and receiving one,
    // but atomic instructions should minimize it.
    var sig struct {
    	note       note
    	mask       [(_NSIG + 31) / 32]uint32
    	wanted     [(_NSIG + 31) / 32]uint32
    	ignored    [(_NSIG + 31) / 32]uint32
    	recv       [(_NSIG + 31) / 32]uint32
    	state      atomic.Uint32
    	delivering atomic.Uint32
    	inuse      bool
    }
    
    const (
    	sigIdle = iota
    	sigReceiving
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top