Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 54 for addUint32 (0.28 sec)

  1. pkg/controller/tainteviction/timed_workers_test.go

    )
    
    func TestExecute(t *testing.T) {
    	testVal := int32(0)
    	wg := sync.WaitGroup{}
    	wg.Add(5)
    	queue := CreateWorkerQueue(func(ctx context.Context, fireAt time.Time, args *WorkArgs) error {
    		atomic.AddInt32(&testVal, 1)
    		wg.Done()
    		return nil
    	})
    	now := time.Now()
    	queue.AddWork(context.TODO(), NewWorkArgs("1", "1"), now, now)
    	queue.AddWork(context.TODO(), NewWorkArgs("2", "2"), now, now)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:23:56 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  2. test/codegen/atomics.go

    	// (for arm64HasATOMICS), while ARM64 v8.1 has only atomic and no dynamic check.
    	// arm64/v8.0:"LDADDALW"
    	// arm64/v8.1:"LDADDALW"
    	// arm64/v8.0:".*arm64HasATOMICS"
    	// arm64/v8.1:-".*arm64HasATOMICS"
    	atomic.AddInt32(&c.count, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 728 bytes
    - Viewed (0)
  3. src/sync/rwmutex_test.go

    	for i := 0; i < num_iterations; i++ {
    		rwm.RLock()
    		n := atomic.AddInt32(activity, 1)
    		if n < 1 || n >= 10000 {
    			rwm.RUnlock()
    			panic(fmt.Sprintf("wlock(%d)\n", n))
    		}
    		for i := 0; i < 100; i++ {
    		}
    		atomic.AddInt32(activity, -1)
    		rwm.RUnlock()
    	}
    	cdone <- true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 29 17:13:13 UTC 2021
    - 4.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing/authentication_info_resolver.go

    }
    
    func (a *authenticationInfoResolver) ClientConfigFor(hostPort string) (*rest.Config, error) {
    	atomic.AddInt32(a.cacheMisses, 1)
    	return a.restConfig, nil
    }
    
    func (a *authenticationInfoResolver) ClientConfigForService(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) {
    	atomic.AddInt32(a.cacheMisses, 1)
    	return a.restConfig, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 18 18:49:55 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  5. src/cmd/internal/bio/buf_mmap.go

    	// mapping, especially since we have no way to unmap it.
    	const threshold = 16 << 10
    	if length < threshold {
    		return nil, false
    	}
    
    	// Have we reached the mmap limit?
    	if atomic.AddInt32(&mmapLimit, -1) < 0 {
    		atomic.AddInt32(&mmapLimit, 1)
    		return nil, false
    	}
    
    	// Page-align the offset.
    	off := r.Offset()
    	align := syscall.Getpagesize()
    	aoff := off &^ int64(align-1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. src/sync/waitgroup_test.go

    	for i := 0; i < 1000; i++ {
    		wg := &WaitGroup{}
    		n := new(int32)
    		// spawn goroutine 1
    		wg.Add(1)
    		go func() {
    			atomic.AddInt32(n, 1)
    			wg.Done()
    		}()
    		// spawn goroutine 2
    		wg.Add(1)
    		go func() {
    			atomic.AddInt32(n, 1)
    			wg.Done()
    		}()
    		// Wait for goroutine 1 and 2
    		wg.Wait()
    		if atomic.LoadInt32(n) != 2 {
    			t.Fatal("Spurious wakeup from Wait")
    		}
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 14 17:38:39 UTC 2021
    - 3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/eventclock/real_event_clock_test.go

    	var numDone int32
    	now := ec.Now()
    	const batchSize = 100
    	times := make(chan time.Time, batchSize+1)
    	try := func(abs bool, d time.Duration) {
    		f := func(u time.Time) {
    			realD := ec.Since(now)
    			atomic.AddInt32(&numDone, 1)
    			times <- u
    			if realD < d {
    				t.Errorf("Asked for %v, got %v", d, realD)
    			}
    		}
    		if abs {
    			ec.EventAfterTime(f, now.Add(d))
    		} else {
    			ec.EventAfterDuration(f, d)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 07 04:07:31 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  8. internal/dsync/drwmutex_test.go

    	for i := 0; i < numIterations; i++ {
    		if rwm.GetRLock(context.Background(), nil, id, source, Options{Timeout: time.Second}) {
    			n := atomic.AddInt32(activity, 1)
    			if n < 1 || n >= 10000 {
    				panic(fmt.Sprintf("wlock(%d)\n", n))
    			}
    			for i := 0; i < 100; i++ {
    			}
    			atomic.AddInt32(activity, -1)
    			rwm.RUnlock(context.Background())
    		}
    	}
    	cdone <- true
    }
    
    // Borrowed from rwmutex_test.go
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testcarchive/testdata/libgo4/libgo4.go

    )
    
    var sigioCount int32
    
    // Catch SIGIO.
    //
    //export GoCatchSIGIO
    func GoCatchSIGIO() {
    	c := make(chan os.Signal, 1)
    	signal.Notify(c, syscall.SIGIO)
    	go func() {
    		for range c {
    			atomic.AddInt32(&sigioCount, 1)
    		}
    	}()
    }
    
    // Raise SIGIO.
    //
    //export GoRaiseSIGIO
    func GoRaiseSIGIO(p *C.pthread_t) {
    	C.CRaiseSIGIO(p)
    }
    
    // Return the number of SIGIO signals seen.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 854 bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete_test.go

    		// we expect CollectionDeleter to be executed once
    		atomic.AddInt32(&invokedGot, 1)
    
    		// we don't expect any context deadline to be set
    		if _, hasDeadline := ctx.Deadline(); hasDeadline {
    			atomic.AddInt32(&hasDeadlineGot, 1)
    		}
    		return nil, nil
    	}
    
    	// do the minimum setup to ensure that it gets as far as CollectionDeleter
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 8.2K bytes
    - Viewed (0)
Back to top