Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for netpollBreak (0.23 sec)

  1. src/runtime/netpoll_epoll.go

    	"internal/runtime/syscall"
    	"unsafe"
    )
    
    var (
    	epfd           int32         = -1 // epoll descriptor
    	netpollEventFd uintptr            // eventfd for netpollBreak
    	netpollWakeSig atomic.Uint32      // used to avoid duplicate calls of netpollBreak
    )
    
    func netpollinit() {
    	var errno uintptr
    	epfd, errno = syscall.EpollCreate1(syscall.EPOLL_CLOEXEC)
    	if errno != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. src/runtime/netpoll_aix.go

    	unlock(&mtxpoll)
    
    	switch mode {
    	case 'r':
    		pfds[pd.user].events |= _POLLIN
    	case 'w':
    		pfds[pd.user].events |= _POLLOUT
    	}
    	unlock(&mtxset)
    }
    
    // netpollBreak interrupts a poll.
    func netpollBreak() {
    	// Failing to cas indicates there is an in-flight wakeup, so we're done here.
    	if !netpollWakeSig.CompareAndSwap(0, 1) {
    		return
    	}
    
    	b := [1]byte{0}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. src/runtime/netpoll_kqueue_pipe.go

    	for {
    		var b byte
    		n := write(netpollBreakWr, unsafe.Pointer(&b), 1)
    		if n == 1 || n == -_EAGAIN {
    			break
    		}
    		if n == -_EINTR {
    			continue
    		}
    		println("runtime: netpollBreak write failed with", -n)
    		throw("runtime: netpollBreak write failed")
    	}
    }
    
    func isWakeup(ev *keventt) bool {
    	if uintptr(ev.ident) == netpollBreakRd {
    		if ev.filter == _EVFILT_READ {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 21:17:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. src/runtime/netpoll_kqueue_event.go

    	for {
    		n := kevent(kq, &ev, 1, nil, 0, nil)
    		if n == 0 {
    			break
    		}
    		if n == -_EINTR {
    			// Check out the comment in addWakeupEvent.
    			continue
    		}
    		println("runtime: netpollBreak write failed with", -n)
    		throw("runtime: netpollBreak write failed")
    	}
    }
    
    func isWakeup(ev *keventt) bool {
    	if ev.filter == _EVFILT_USER {
    		if ev.ident == kqIdent {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:15:46 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  5. src/runtime/netpoll_kqueue.go

    	// on fd will remove any kevents that reference the descriptor.
    	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)
    }
    
    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/netpoll_windows.go

    	ov       *overlapped
    	internal uintptr
    	qty      uint32
    }
    
    var (
    	iocphandle uintptr = _INVALID_HANDLE_VALUE // completion port io handle
    
    	netpollWakeSig atomic.Uint32 // used to avoid duplicate calls of netpollBreak
    )
    
    func netpollinit() {
    	iocphandle = stdcall4(_CreateIoCompletionPort, _INVALID_HANDLE_VALUE, 0, 0, _DWORD_MAX)
    	if iocphandle == 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)
  7. src/runtime/netpoll_solaris.go

    	case 'r':
    		netpollupdate(pd, _POLLIN, 0)
    	case 'w':
    		netpollupdate(pd, _POLLOUT, 0)
    	default:
    		throw("runtime: bad mode")
    	}
    	unlock(&pd.lock)
    }
    
    // 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
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  8. src/runtime/netpoll_stub.go

    // netpollBroken, protected by netpollBrokenLock, avoids a double notewakeup.
    var netpollBrokenLock mutex
    var netpollBroken bool
    
    func netpollGenericInit() {
    	netpollInited.Store(1)
    }
    
    func netpollBreak() {
    	lock(&netpollBrokenLock)
    	broken := netpollBroken
    	netpollBroken = true
    	if !broken {
    		notewakeup(&netpollNote)
    	}
    	unlock(&netpollBrokenLock)
    }
    
    // Polls for ready network connections.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. src/runtime/netpoll_wasip1.go

    		if pds[i].fd == fd {
    			netpolldisarm(pds[i], 'r'+'w')
    			pds[i] = pds[len(pds)-1]
    			pds = pds[:len(pds)-1]
    			break
    		}
    	}
    	unlock(&mtx)
    	return 0
    }
    
    func netpollBreak() {}
    
    func netpoll(delay int64) (gList, int32) {
    	lock(&mtx)
    
    	// If delay >= 0, we include a subscription of type Clock that we use as
    	// a timeout. If delay < 0, we omit the subscription and allow poll_oneoff
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  10. src/runtime/netpoll.go

    //     Return a list of goroutines built by calling netpollready,
    //     and a delta to add to netpollWaiters when all goroutines are ready.
    //     This will never return an empty list with a non-zero delta.
    //
    // func netpollBreak()
    //     Wake up the network poller, assumed to be blocked in netpoll.
    //
    // func netpollIsPollDescriptor(fd uintptr) bool
    //     Reports whether fd is a file descriptor used by the poller.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 20.7K bytes
    - Viewed (0)
Back to top