Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 60 for mp (0.02 sec)

  1. src/runtime/lock_sema.go

    //
    //	func semacreate(mp *m)
    //		Create a semaphore for mp, if it does not already have one.
    //
    //	func semasleep(ns int64) int32
    //		If ns < 0, acquire m's semaphore and return 0.
    //		If ns >= 0, try to acquire m's semaphore for at most ns nanoseconds.
    //		Return 0 if the semaphore was acquired, -1 if interrupted or timed out.
    //
    //	func semawakeup(mp *m)
    //		Wake up mp, which is or will soon be sleeping on its semaphore.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. internal/mountinfo/mountinfo_linux_test.go

    			t.Fatalf("expected 3 mounts, got %d", len(mounts))
    		}
    		mp := mountInfo{"/dev/0", "/path/to/0", "type0", []string{"flags"}, "0", "0"}
    		if !mountPointsEqual(mounts[0], mp) {
    			t.Errorf("got unexpected MountPoint[0]: %#v", mounts[0])
    		}
    		mp = mountInfo{"/dev/1", "/path/to/1", "type1", []string{"flags"}, "1", "1"}
    		if !mountPointsEqual(mounts[1], mp) {
    			t.Errorf("got unexpected mountInfo[1]: %#v", mounts[1])
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. src/runtime/export_unix_test.go

    // a non-zero byte to w, WaitForSigusr1 returns immediately with -1, -1.
    func WaitForSigusr1(r, w int32, ready func(mp *M)) (int64, int64) {
    	lockOSThread()
    	// Make sure we can receive SIGUSR1.
    	unblocksig(_SIGUSR1)
    
    	waitForSigusr1.rdpipe = r
    	waitForSigusr1.wrpipe = w
    
    	mp := getg().m
    	testSigusr1 = waitForSigusr1Callback
    	ready(mp)
    
    	// Wait for the signal. We use a pipe rather than a note
    	// because write is always async-signal-safe.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 21:27:51 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  4. src/runtime/lock_js.go

    		id := scheduleTimeoutEvent(delay)
    		mp := acquirem()
    		notes[n] = gp
    		notesWithTimeout[n] = noteWithTimeout{gp: gp, deadline: deadline}
    		releasem(mp)
    
    		gopark(nil, nil, waitReasonSleep, traceBlockSleep, 1)
    
    		clearTimeoutEvent(id) // note might have woken early, clear timeout
    
    		mp = acquirem()
    		delete(notes, n)
    		delete(notesWithTimeout, n)
    		releasem(mp)
    
    		return n.key == note_woken
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. test/typeparam/pair.go

    		panic(fmt.Sprintf("unexpected f2 size == %d, want %d", got, want))
    	}
    
    	type mypair struct {
    		f1 int32
    		f2 int64
    	}
    	mp := mypair(p)
    	if mp.f1 != 1 || mp.f2 != 2 {
    		panic(fmt.Sprintf("mp == %#v, want %#v", mp, mypair{1, 2}))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 739 bytes
    - Viewed (0)
  6. src/runtime/tracebuf.go

    	return traceWriter{traceLocker: traceLocker{gen: gen}, traceBuf: buf}
    }
    
    // end writes the buffer back into the m.
    func (w traceWriter) end() {
    	if w.mp == nil {
    		// Tolerate a nil mp. It makes code that creates traceWriters directly
    		// less error-prone.
    		return
    	}
    	w.mp.trace.buf[w.gen%2] = w.traceBuf
    }
    
    // ensure makes sure that at least maxSize bytes are available to write.
    //
    // Returns whether the buffer was flushed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  7. src/runtime/rand.go

    	mp := getg().m
    	c := &mp.chacha8
    	for {
    		// Note: c.Next is marked nosplit,
    		// so we don't need to use mp.locks
    		// on the fast path, which is that the
    		// first attempt succeeds.
    		x, ok := c.Next()
    		if ok {
    			return x
    		}
    		mp.locks++ // hold m even though c.Refill may do stack split checks
    		c.Refill()
    		mp.locks--
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. pilot/pkg/leaderelection/k8sleaderelection/metrics.go

    	onlyOnce sync.Once
    }
    
    func (f *leaderMetricsFactory) setProvider(mp MetricsProvider) {
    	f.onlyOnce.Do(func() {
    		f.metricsProvider = mp
    	})
    }
    
    func (f *leaderMetricsFactory) newLeaderMetrics() leaderMetricsAdapter {
    	mp := f.metricsProvider
    	if mp == (noopMetricsProvider{}) {
    		return noMetrics{}
    	}
    	return &defaultLeaderMetrics{
    		leader: mp.NewLeaderMetric(),
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Oct 11 16:58:48 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  9. src/runtime/os_netbsd_arm64.go

    	"unsafe"
    )
    
    func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
    	// Machine dependent mcontext initialisation for LWP.
    	mc.__gregs[_REG_ELR] = uint64(abi.FuncPCABI0(lwp_tramp))
    	mc.__gregs[_REG_X31] = uint64(uintptr(stk))
    	mc.__gregs[_REG_X0] = uint64(uintptr(unsafe.Pointer(mp)))
    	mc.__gregs[_REG_X1] = uint64(uintptr(unsafe.Pointer(mp.g0)))
    	mc.__gregs[_REG_X2] = uint64(fn)
    }
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 769 bytes
    - Viewed (0)
  10. src/runtime/tracecpu.go

    // profiling buffer. It is called from a signal handler, so is limited in what
    // it can do. mp must be the thread that is currently stopped in a signal.
    func traceCPUSample(gp *g, mp *m, pp *p, stk []uintptr) {
    	if !traceEnabled() {
    		// Tracing is usually turned off; don't spend time acquiring the signal
    		// lock unless it's active.
    		return
    	}
    	if mp == nil {
    		// Drop samples that don't have an identifiable thread. We can't render
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top