Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 487 for acquirem (0.13 sec)

  1. src/runtime/malloc.go

    //
    // This function is idempotent.
    //
    // The heap lock must not be held over this operation, since it will briefly acquire
    // the heap lock.
    //
    // Must be called on the system stack because it acquires the heap lock.
    //
    //go:systemstack
    func (h *mheap) enableMetadataHugePages() {
    	// Enable huge pages for page structure.
    	h.pages.enableChunkHugePages()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  2. src/runtime/mprof.go

    		// can't record a stack trace.
    		return
    	}
    	if skip > maxSkip {
    		print("requested skip=", skip)
    		throw("invalid skip value")
    	}
    	gp := getg()
    	mp := acquirem() // we must not be preempted while accessing profstack
    
    	nstk := 1
    	if tracefpunwindoff() || gp.m.hasCgoOnStack() {
    		mp.profStack[0] = logicalStackSentinel
    		if gp.m.curg == nil || gp.m.curg == gp {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 53.3K bytes
    - Viewed (0)
  3. src/runtime/time.go

    	// has marked as idle with no timers, in which case the timer could
    	// go unnoticed until long after t.when.
    	// Calling acquirem instead of using getg().m makes sure that
    	// we end up locking and inserting into the current P's timers.
    	mp := acquirem()
    	ts := &mp.p.ptr().timers
    	ts.lock()
    	ts.cleanHead()
    	t.lock()
    	t.trace("maybeAdd")
    	when := int64(0)
    	wake := false
    	if t.needsAdd() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  4. src/runtime/traceruntime.go

    //
    //go:nosplit
    func traceAcquireEnabled() traceLocker {
    	// Any time we acquire a traceLocker, we may flush a trace buffer. But
    	// buffer flushes are rare. Record the lock edge even if it doesn't happen
    	// this time.
    	lockRankMayTraceFlush()
    
    	// Prevent preemption.
    	mp := acquirem()
    
    	// Acquire the trace seqlock. This prevents traceAdvance from moving forward
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 25.7K bytes
    - Viewed (0)
  5. src/runtime/cgocall.go

    	restore = false
    }
    
    func unwindm(restore *bool) {
    	if *restore {
    		// Restore sp saved by cgocallback during
    		// unwind of g's stack (see comment at top of file).
    		mp := acquirem()
    		sched := &mp.g0.sched
    		sched.sp = *(*uintptr)(unsafe.Pointer(sched.sp + alignUp(sys.MinFrameSize, sys.StackAlign)))
    
    		// Do the accounting that cgocall will not have a chance to do
    		// during an unwind.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  6. src/runtime/mstats.go

    	noPLock mutex
    }
    
    // acquire returns a heapStatsDelta to be updated. In effect,
    // it acquires the shard for writing. release must be called
    // as soon as the relevant deltas are updated.
    //
    // The returned heapStatsDelta must be updated atomically.
    //
    // The caller's P must not change between acquire and
    // release. This also means that the caller should not
    // acquire a P or release its P in between. A P also must
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 21:03:13 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sync/semaphore/semaphore.go

    type Weighted struct {
    	size    int64
    	cur     int64
    	mu      sync.Mutex
    	waiters list.List
    }
    
    // Acquire acquires the semaphore with a weight of n, blocking until resources
    // are available or ctx is done. On success, returns nil. On failure, returns
    // ctx.Err() and leaves the semaphore unchanged.
    func (s *Weighted) Acquire(ctx context.Context, n int64) error {
    	done := ctx.Done()
    
    	s.mu.Lock()
    	select {
    	case <-done:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

       */
      @CanIgnoreReturnValue
      public double acquire() {
        return acquire(1);
      }
    
      /**
       * Acquires the given number of permits from this {@code RateLimiter}, blocking until the request
       * can be granted. Tells the amount of time slept, if any.
       *
       * @param permits the number of permits to acquire
       * @return time spent sleeping to enforce rate, in seconds; 0.0 if not rate-limited
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/RateLimiter.java

       */
      @CanIgnoreReturnValue
      public double acquire() {
        return acquire(1);
      }
    
      /**
       * Acquires the given number of permits from this {@code RateLimiter}, blocking until the request
       * can be granted. Tells the amount of time slept, if any.
       *
       * @param permits the number of permits to acquire
       * @return time spent sleeping to enforce rate, in seconds; 0.0 if not rate-limited
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  10. test/typeparam/chans.go

    	}
    	r.c <- initial
    	return r
    }
    
    // _Acquire acquires the exclusive value for private use.
    // It must be released using the Release method.
    func (e *_Exclusive[Val]) Acquire() Val {
    	return <-e.c
    }
    
    // TryAcquire attempts to acquire the value. The ok result reports whether
    // the value was acquired. If the value is acquired, it must be released
    // using the Release method.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 8.4K bytes
    - Viewed (0)
Back to top