- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for wakep (0.05 sec)
-
src/runtime/trace.go
} wakeup := s.wakeup if raceenabled { racerelease(unsafe.Pointer(&s.lock)) } unlock(&s.lock) <-wakeup s.timer.stop() } // wake awakens any goroutine sleeping on the timer. // // Safe for concurrent use with all other methods. func (s *wakeableSleep) wake() { // Grab the wakeup channel, which may be nil if we're // racing with close. lock(&s.lock)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 37.1K bytes - Viewed (0) -
src/runtime/os_darwin.go
} } //go:nosplit func semasleep(ns int64) int32 { var start int64 if ns >= 0 { start = nanotime() } g := getg() mp := g.m if g == mp.gsignal { // sema sleep/wakeup are implemented with pthreads, which are not async-signal-safe on Darwin. throw("semasleep on Darwin signal stack") } pthread_mutex_lock(&mp.mutex) for { if mp.count > 0 { mp.count--
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 20:34:30 UTC 2023 - 11.9K bytes - Viewed (0) -
src/runtime/sema.go
// Intended use is provide a sleep and wakeup // primitive that can be used in the contended case // of other synchronization primitives. // Thus it targets the same goal as Linux's futex, // but it has much simpler semantics. // // That is, don't think of these as semaphores. // Think of them as a way to implement sleep and wakeup // such that every sleep is paired with a single wakeup,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 19K bytes - Viewed (0) -
src/runtime/netpoll_solaris.go
} // netpollBreak interrupts a port_getn wait. func netpollBreak() { // Failing to cas indicates there is an in-flight wakeup, so we're done here. if !netpollWakeSig.CompareAndSwap(0, 1) { return } // Use port_alert to put portfd into alert mode. // This will wake up all threads sleeping in port_getn on portfd, // and cause their calls to port_getn to return immediately.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 11.2K bytes - Viewed (0) -
src/time/sleep_test.go
// Sleep(0) sets G's status to Gwaiting, but then immediately returns leaving the status. // Then the goroutine calls e.g. new and falls down into the scheduler due to pending GC. // After the GC nobody wakes up the goroutine from Gwaiting status. defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(4)) c := make(chan bool) go func() { for i := 0; i < 100; i++ { runtime.GC() } c <- true }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:33:57 UTC 2024 - 22.5K bytes - Viewed (0) -
src/runtime/os_linux.go
// Linux futex. // // futexsleep(uint32 *addr, uint32 val) // futexwakeup(uint32 *addr) // // Futexsleep atomically checks if *addr == val and if so, sleeps on addr. // Futexwakeup wakes up threads sleeping on addr. // Futexsleep is allowed to wake up spuriously. const ( _FUTEX_PRIVATE_FLAG = 128 _FUTEX_WAIT_PRIVATE = 0 | _FUTEX_PRIVATE_FLAG _FUTEX_WAKE_PRIVATE = 1 | _FUTEX_PRIVATE_FLAG ) // Atomically, //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 25.9K bytes - Viewed (0) -
src/runtime/time.go
ts.lock() ts.cleanHead() t.lock() t.trace("maybeAdd") when := int64(0) wake := false if t.needsAdd() { t.state |= timerHeaped when = t.when wakeTime := ts.wakeTime() wake = wakeTime == 0 || when < wakeTime ts.addHeap(t) } t.unlock() ts.unlock() releasem(mp) if wake { wakeNetPoller(when) } } // reset resets the time when a timer should fire.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 14:36:24 UTC 2024 - 37.5K bytes - Viewed (0) -
src/runtime/runtime2.go
// previous notesleep has returned, e.g. it's disallowed // to call noteclear straight after notewakeup. // // 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. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 47.9K bytes - Viewed (0) -
src/internal/trace/trace_test.go
t.Logf("%d: %q", samples, stack) } t.Logf("CPU profile:\n%s", stderr) } }) } func TestTraceFutileWakeup(t *testing.T) { testTraceProg(t, "futile-wakeup.go", func(t *testing.T, tb, _ []byte, _ bool) { // Check to make sure that no goroutine in the "special" trace region // ends up blocking, unblocking, then immediately blocking again. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 18.5K bytes - Viewed (0) -
src/runtime/select.go
} else { c.recvq.dequeueSudoG(sglist) } } sgnext = sglist.waitlink sglist.waitlink = nil releaseSudog(sglist) sglist = sgnext } if cas == nil { throw("selectgo: bad wakeup") } c = cas.c if debugSelect { print("wait-return: cas0=", cas0, " c=", c, " cas=", cas, " send=", casi < nsends, "\n") } if casi < nsends { if !caseSuccess { goto sclose
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 13 21:36:04 UTC 2024 - 15K bytes - Viewed (0)