Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 85 for wakep (0.06 sec)

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

    	return 0
    }
    
    func netpollarm(pd *pollDesc, mode int) {
    	throw("runtime: unused")
    }
    
    // netpollBreak interrupts a kevent.
    func netpollBreak() {
    	// Failing to cas indicates there is an in-flight wakeup, so we're done here.
    	if !netpollWakeSig.CompareAndSwap(0, 1) {
    		return
    	}
    
    	wakeNetpoll(kq)
    }
    
    // netpoll checks for ready network connections.
    // Returns list of goroutines that become runnable.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 21:17:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. src/runtime/tracecpu.go

    	//   that the trace is disabled.
    	// - The logger goroutine is asleep.
    	//
    	// Wake the goroutine so it can observe that their the buffer is
    	// closed an exit.
    	trace.cpuLogWrite[0].Store(nil)
    	trace.cpuLogWrite[1].Store(nil)
    	trace.cpuLogRead[0].close()
    	trace.cpuLogRead[1].close()
    	trace.cpuSleep.wake()
    
    	// Wait until the logger goroutine exits.
    	<-trace.cpuLogDone
    
    	// Clear state for the next trace.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  5. src/runtime/netpoll_windows.go

    	// nothing to do
    	return 0
    }
    
    func netpollarm(pd *pollDesc, mode int) {
    	throw("runtime: unused")
    }
    
    func netpollBreak() {
    	// Failing to cas indicates there is an in-flight wakeup, so we're done here.
    	if !netpollWakeSig.CompareAndSwap(0, 1) {
    		return
    	}
    
    	key := packNetpollKey(netpollSourceBreak, nil)
    	if stdcall4(_PostQueuedCompletionStatus, iocphandle, 0, key, 0) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. 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)
  7. src/runtime/netpoll_aix.go

    	rdwake         int32
    	wrwake         int32
    	pendingUpdates int32
    
    	netpollWakeSig atomic.Uint32 // used to avoid duplicate calls of netpollBreak
    )
    
    func netpollinit() {
    	// Create the pipe we use to wakeup poll.
    	r, w, errno := nonblockingPipe()
    	if errno != 0 {
    		throw("netpollinit: failed to create pipe")
    	}
    	rdwake = r
    	wrwake = w
    
    	// Pre-allocate array of pollfd structures for poll.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. 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)
  9. src/runtime/lock_wasip1.go

    	}
    	l.key = mutex_unlocked
    }
    
    // One-time notifications.
    func noteclear(n *note) {
    	n.key = 0
    }
    
    func notewakeup(n *note) {
    	if n.key != 0 {
    		print("notewakeup - double wakeup (", n.key, ")\n")
    		throw("notewakeup - double wakeup")
    	}
    	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")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 2K bytes
    - Viewed (0)
  10. src/sync/cond.go

    //	... make use of condition ...
    //	c.L.Unlock()
    func (c *Cond) Wait() {
    	c.checker.check()
    	t := runtime_notifyListAdd(&c.notify)
    	c.L.Unlock()
    	runtime_notifyListWait(&c.notify, t)
    	c.L.Lock()
    }
    
    // Signal wakes one goroutine waiting on c, if there is any.
    //
    // It is allowed but not required for the caller to hold c.L
    // during the call.
    //
    // Signal() does not affect goroutine scheduling priority; if other goroutines
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top