Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 111 for wakep (0.05 sec)

  1. src/internal/trace/parser.go

    package trace
    
    // Frame is a frame in stack traces.
    type Frame struct {
    	PC   uint64
    	Fn   string
    	File string
    	Line int
    }
    
    const (
    	// Special P identifiers:
    	FakeP    = 1000000 + iota
    	TimerP   // depicts timer unblocks
    	NetpollP // depicts network unblocks
    	SyscallP // depicts returns from syscalls
    	GCP      // depicts GC state
    	ProfileP // depicts recording of CPU profile samples
    )
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:31:04 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/net/fd_unix.go

    	}
    
    	// Start the "interrupter" goroutine, if this context might be canceled.
    	//
    	// The interrupter goroutine waits for the context to be done and
    	// interrupts the dial (by altering the fd's write deadline, which
    	// wakes up waitWrite).
    	ctxDone := ctx.Done()
    	if ctxDone != nil {
    		// Wait for the interrupter goroutine to exit before returning
    		// from connect.
    		done := make(chan struct{})
    		interruptRes := make(chan error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 20:19:46 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top