Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. src/runtime/traceruntime.go

    	//
    	// Perform a traceAcquire/traceRelease on behalf of mp to
    	// synchronize with the tracer trying to flush our buffer
    	// as well.
    	seq := mp.trace.seqlock.Add(1)
    	if debugTraceReentrancy && seq%2 != 1 {
    		throw("bad use of trace.seqlock or tracer is reentrant")
    	}
    	systemstack(func() {
    		lock(&trace.lock)
    		for i := range mp.trace.buf {
    			if mp.trace.buf[i] != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 25.7K bytes
    - Viewed (0)
  4. src/runtime/cgocall.go

    	// trace event in entersyscall above.
    	mp.ncgo++
    
    	errno := asmcgocall(fn, arg)
    
    	// Update accounting before exitsyscall because exitsyscall may
    	// reschedule us on to a different M.
    	mp.incgo = false
    	mp.ncgo--
    
    	osPreemptExtExit(mp)
    
    	// Save current syscall parameters, so m.winsyscall can be
    	// used again if callback decide to make syscall.
    	winsyscall := mp.winsyscall
    
    	exitsyscall()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  5. src/runtime/os_linux.go

    	// executes the system call exactly once.
    	for mp := allm; mp != nil; mp = mp.alllink {
    		for atomic.Load64(&mp.procid) == 0 {
    			// Thread is starting.
    			osyield()
    		}
    	}
    
    	// Signal every other thread, where they will execute perThreadSyscall
    	// from the signal handler.
    	gp := getg()
    	tid := gp.m.procid
    	for mp := allm; mp != nil; mp = mp.alllink {
    		if atomic.Load64(&mp.procid) == tid {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  6. 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)
  7. src/runtime/preempt.go

    		ready(gp, 0, true)
    	}
    }
    
    // canPreemptM reports whether mp is in a state that is safe to preempt.
    //
    // It is nosplit because it has nosplit callers.
    //
    //go:nosplit
    func canPreemptM(mp *m) bool {
    	return mp.locks == 0 && mp.mallocing == 0 && mp.preemptoff == "" && mp.p.ptr().status == _Prunning
    }
    
    //go:generate go run mkpreempt.go
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  8. src/runtime/os_freebsd.go

    //
    //go:nowritebarrier
    func newosproc(mp *m) {
    	stk := unsafe.Pointer(mp.g0.stack.hi)
    	if false {
    		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " thr_start=", abi.FuncPCABI0(thr_start), " id=", mp.id, " ostk=", &mp, "\n")
    	}
    
    	param := thrparam{
    		start_func: abi.FuncPCABI0(thr_start),
    		arg:        unsafe.Pointer(mp),
    		stack_base: mp.g0.stack.lo,
    		stack_size: uintptr(stk) - mp.g0.stack.lo,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top