Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 92 for Loadint32 (0.29 sec)

  1. test/fixedbugs/bug512.go

    var wg sync.WaitGroup
    
    type S struct {
    	i1, i2 int32
    }
    
    var done int32
    
    func (s S) Check(v1, v2 int32) {
    	for {
    		if g1 := atomic.LoadInt32(&s.i1); v1 != g1 {
    			panic(g1)
    		}
    		if g2 := atomic.LoadInt32(&s.i2); v2 != g2 {
    			panic(g2)
    		}
    		if atomic.LoadInt32(&done) != 0 {
    			break
    		}
    	}
    	wg.Done()
    }
    
    func F() {
    	s := S{1, 2}
    	go s.Check(1, 2)
    	atomic.StoreInt32(&s.i1, 3)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 17 19:15:18 UTC 2021
    - 793 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testcarchive/testdata/libgo8/a.go

    // Start a goroutine that loops forever.
    func init() {
    	runtime.GOMAXPROCS(1)
    	go func() {
    		for {
    			atomic.StoreInt32(&started, 1)
    		}
    	}()
    }
    
    //export GoFunction8
    func GoFunction8() {
    	for atomic.LoadInt32(&started) == 0 {
    		runtime.Gosched()
    	}
    	os.Exit(0)
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 529 bytes
    - Viewed (0)
  3. test/fixedbugs/issue11256.go

    			// There's a very narrow window here on most
    			// OSs, so we basically can't do anything (not
    			// even a time.Sleep or a channel).
    			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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 29 15:02:30 UTC 2015
    - 1.1K bytes
    - Viewed (0)
  4. pkg/controller/tainteviction/timed_workers_test.go

    	queue.AddWork(context.TODO(), NewWorkArgs("3", "3"), now, now)
    	queue.AddWork(context.TODO(), NewWorkArgs("4", "4"), now, now)
    	queue.AddWork(context.TODO(), NewWorkArgs("5", "5"), now, now)
    	wg.Wait()
    	lastVal := atomic.LoadInt32(&testVal)
    	if lastVal != 5 {
    		t.Errorf("Expected testVal = 5, got %v", lastVal)
    	}
    }
    
    func TestExecuteDelayed(t *testing.T) {
    	testVal := int32(0)
    	wg := sync.WaitGroup{}
    	wg.Add(5)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:23:56 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. src/runtime/race/testdata/atomic_test.go

    	_ = x
    	var s int32
    	go func() {
    		x = 2
    		atomic.AddInt32(&s, 1)
    	}()
    	for atomic.LoadInt32(&s) != 1 {
    		runtime.Gosched()
    	}
    	x = 1
    }
    
    func TestNoRaceAtomicLoadStoreInt32(t *testing.T) {
    	var x int64
    	_ = x
    	var s int32
    	go func() {
    		x = 2
    		atomic.StoreInt32(&s, 1)
    	}()
    	for atomic.LoadInt32(&s) != 1 {
    		runtime.Gosched()
    	}
    	x = 1
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 16 17:26:46 UTC 2020
    - 4.9K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/issue9400/gccgo.go

    // 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)
  7. internal/http/server.go

    	requestCount    int32         // counter holds no. of request in progress.
    }
    
    // GetRequestCount - returns number of request in progress.
    func (srv *Server) GetRequestCount() int {
    	return int(atomic.LoadInt32(&srv.requestCount))
    }
    
    // Init - init HTTP server
    func (srv *Server) Init(listenCtx context.Context, listenErrCallback func(listenAddr string, err error)) (serve func() error, err error) {
    	// Take a copy of server fields.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Feb 09 21:25:16 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. src/internal/runtime/atomic/stubs.go

    //go:noescape
    func Loaduintptr(ptr *uintptr) uintptr
    
    //go:noescape
    func Loaduint(ptr *uint) uint
    
    // TODO(matloob): Should these functions have the go:noescape annotation?
    
    //go:noescape
    func Loadint32(ptr *int32) int32
    
    //go:noescape
    func Loadint64(ptr *int64) int64
    
    //go:noescape
    func Xaddint32(ptr *int32, delta int32) int32
    
    //go:noescape
    func Xaddint64(ptr *int64, delta int64) int64
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testcarchive/testdata/libgo4/libgo4.go

    //
    //export GoRaiseSIGIO
    func GoRaiseSIGIO(p *C.pthread_t) {
    	C.CRaiseSIGIO(p)
    }
    
    // Return the number of SIGIO signals seen.
    //
    //export SIGIOCount
    func SIGIOCount() C.int {
    	return C.int(atomic.LoadInt32(&sigioCount))
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 854 bytes
    - Viewed (0)
  10. src/internal/runtime/atomic/atomic_wasm.go

    // See https://github.com/WebAssembly/design/issues/1073
    
    // Export some functions via linkname to assembly in sync/atomic.
    //
    //go:linkname Load
    //go:linkname Loadp
    //go:linkname Load64
    //go:linkname Loadint32
    //go:linkname Loadint64
    //go:linkname Loaduintptr
    //go:linkname LoadAcquintptr
    //go:linkname Xadd
    //go:linkname Xaddint32
    //go:linkname Xaddint64
    //go:linkname Xadd64
    //go:linkname Xadduintptr
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 5.4K bytes
    - Viewed (0)
Back to top