Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for notesleep (0.38 sec)

  1. src/runtime/lock_wasip1.go

    	}
    	n.key = 1
    }
    
    func notesleep(n *note) {
    	throw("notesleep not supported by wasi")
    }
    
    func notetsleep(n *note, ns int64) bool {
    	throw("notetsleep not supported by wasi")
    	return false
    }
    
    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    	if gp == gp.m.g0 {
    		throw("notetsleepg on g0")
    	}
    
    	deadline := nanotime() + ns
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. src/runtime/lock_futex.go

    	return atomic.Load(key32(&n.key)) != 0
    }
    
    func notetsleep(n *note, ns int64) bool {
    	gp := getg()
    	if gp != gp.m.g0 && gp.m.preemptoff != "" {
    		throw("notetsleep not on g0")
    	}
    
    	return notetsleep_internal(n, ns)
    }
    
    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    // calls only nosplit functions between entersyscallblock/exitsyscall.
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:34 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. src/runtime/lock_sema.go

    		semawakeup((*m)(unsafe.Pointer(v)))
    	}
    }
    
    func notesleep(n *note) {
    	gp := getg()
    	if gp != gp.m.g0 {
    		throw("notesleep not on g0")
    	}
    	semacreate(gp.m)
    	if !atomic.Casuintptr(&n.key, 0, uintptr(unsafe.Pointer(gp.m))) {
    		// Must be locked (got wakeup).
    		if n.key != locked {
    			throw("notesleep - waitm out of sync")
    		}
    		return
    	}
    	// Queued. Sleep.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  4. src/runtime/lock_js.go

    		goready(notes[n], 1)
    	}
    }
    
    func notesleep(n *note) {
    	throw("notesleep not supported by js")
    }
    
    func notetsleep(n *note, ns int64) bool {
    	throw("notetsleep not supported by js")
    	return false
    }
    
    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    	if gp == gp.m.g0 {
    		throw("notetsleepg on g0")
    	}
    
    	if ns >= 0 {
    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. src/runtime/rwmutex.go

    				unlock(&rw.rLock)
    			} else {
    				// Queue this reader to be woken by
    				// the writer.
    				m := getg().m
    				m.schedlink = rw.readers
    				rw.readers.set(m)
    				unlock(&rw.rLock)
    				notesleep(&m.park)
    				noteclear(&m.park)
    			}
    		})
    	}
    }
    
    // runlock undoes a single rlock call on rw.
    func (rw *rwmutex) runlock() {
    	if r := rw.readerCount.Add(-1); r < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. src/runtime/HACKING.md

    the lowest levels of the runtime, but also prevents any associated G
    and P from being rescheduled. `rwmutex` is similar.
    
    For one-shot notifications, use `note`, which provides `notesleep` and
    `notewakeup`. Unlike traditional UNIX `sleep`/`wakeup`, `note`s are
    race-free, so `notesleep` returns immediately if the `notewakeup` has
    already happened. A `note` can be reset after use with `noteclear`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. src/runtime/runtime2.go

    //
    // notetsleep is like notesleep but wakes up after
    // a given number of nanoseconds even if the event
    // has not yet happened.  if a goroutine uses notetsleep to
    // wake up early, it must wait to call noteclear until it
    // can be sure that no other goroutine is calling
    // notewakeup.
    //
    // notesleep/notetsleep are generally called on g0,
    // notetsleepg is similar to notetsleep but is called on user g.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  8. samples/sleep/notsleep.yaml

    # Notsleep service - based on the sleep service but has its own identity and affinity rule
    ##################################################################################################
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: notsleep
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: notsleep
      labels:
        app: notsleep
        service: notsleep
    spec:
      ports:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 27 20:55:14 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. src/runtime/proc.go

    		cgoHasExtraM = true
    		newextram()
    	}
    	initsig(false)
    }
    
    // mPark causes a thread to park itself, returning once woken.
    //
    //go:nosplit
    func mPark() {
    	gp := getg()
    	notesleep(&gp.m.park)
    	noteclear(&gp.m.park)
    }
    
    // mexit tears down and exits the current thread.
    //
    // Don't call this directly to exit the thread, since it must run at
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  10. src/runtime/netpoll_stub.go

    		// the note. It should normally be completely uncontended.
    		lock(&netpollStubLock)
    
    		lock(&netpollBrokenLock)
    		noteclear(&netpollNote)
    		netpollBroken = false
    		unlock(&netpollBrokenLock)
    
    		notetsleep(&netpollNote, delay)
    		unlock(&netpollStubLock)
    		// Guard against starvation in case the lock is contended
    		// (eg when running TestNetpollBreak).
    		osyield()
    	}
    	return gList{}, 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.5K bytes
    - Viewed (0)
Back to top