Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for LockOSCounts (0.14 sec)

  1. src/runtime/proc_test.go

    		t.Skip("no threads on wasm yet")
    	}
    
    	go func() {
    		e, i := runtime.LockOSCounts()
    		if e != 0 || i != 0 {
    			t.Errorf("want locked counts 0, 0; got %d, %d", e, i)
    			return
    		}
    		runtime.LockOSThread()
    		runtime.LockOSThread()
    		runtime.UnlockOSThread()
    		e, i = runtime.LockOSCounts()
    		if e != 1 || i != 0 {
    			t.Errorf("want locked counts 1, 0; got %d, %d", e, i)
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  2. src/runtime/export_test.go

    func MapBucketsPointerIsNil(m map[int]int) bool {
    	h := *(**hmap)(unsafe.Pointer(&m))
    	return h.buckets == nil
    }
    
    func OverLoadFactor(count int, B uint8) bool {
    	return overLoadFactor(count, B)
    }
    
    func LockOSCounts() (external, internal uint32) {
    	gp := getg()
    	if gp.m.lockedExt+gp.m.lockedInt == 0 {
    		if gp.lockedm != 0 {
    			panic("lockedm on non-locked goroutine")
    		}
    	} else {
    		if gp.lockedm == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top