Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,266 for pollable (0.24 sec)

  1. src/internal/poll/fd_unix.go

    // The net argument is a network name from the net package (e.g., "tcp"),
    // or "file".
    // Set pollable to true if fd should be managed by runtime netpoll.
    func (fd *FD) Init(net string, pollable bool) error {
    	fd.SysFile.init()
    
    	// We don't actually care about the various network types.
    	if net == "file" {
    		fd.isFile = true
    	}
    	if !pollable {
    		fd.isBlocking = 1
    		return nil
    	}
    	err := fd.pd.init(fd)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 04:09:44 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  2. src/os/file_unix.go

    				pollable = false
    			}
    
    			// In addition to the behavior described above for regular files,
    			// on Darwin, kqueue does not work properly with fifos:
    			// closing the last writer does not cause a kqueue event
    			// for any readers. See issue #24164.
    			if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && typ == syscall.S_IFIFO {
    				pollable = false
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:52:34 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  3. src/internal/poll/error_linux_test.go

    	return os.OpenFile("/dev/net/tun", os.O_RDWR, 0)
    }
    
    func isBadStateFileError(err error) (string, bool) {
    	switch err {
    	case poll.ErrNotPollable, syscall.EBADFD:
    		return "", true
    	default:
    		return "not pollable or file in bad state error", false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 08:53:02 UTC 2019
    - 748 bytes
    - Viewed (0)
  4. src/internal/poll/fd_unixjs.go

    	if err := fd.incref(); err != nil {
    		return 0, err
    	}
    	defer fd.decref()
    	for {
    		n, err := ignoringEINTRIO(syscall.ReadDirent, fd.Sysfd, buf)
    		if err != nil {
    			n = 0
    			if err == syscall.EAGAIN && fd.pd.pollable() {
    				if err = fd.pd.waitRead(fd.isFile); err == nil {
    					continue
    				}
    			}
    		}
    		// Do not call eofError; caller does not expect to see io.EOF.
    		return n, err
    	}
    }
    
    // Seek wraps syscall.Seek.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. src/internal/poll/fd_poll_js.go

    func (pd *pollDesc) waitWrite(isFile bool) error { return pd.wait('w', isFile) }
    
    func (pd *pollDesc) waitCanceled(mode int) {}
    
    func (pd *pollDesc) pollable() bool { return true }
    
    // SetDeadline sets the read and write deadlines associated with fd.
    func (fd *FD) SetDeadline(t time.Time) error {
    	return setDeadlineImpl(fd, t, 'r'+'w')
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:40 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  6. src/os/fifo_test.go

    // Issue #59545.
    func TestNonPollable(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping test with tight loops in short mode")
    	}
    
    	// We need to open a non-pollable file.
    	// This is almost certainly Linux-specific,
    	// but if other systems have non-pollable files,
    	// we can add them here.
    	const nonPollable = "/dev/net/tun"
    
    	f, err := os.OpenFile(nonPollable, os.O_RDWR, 0)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:47:23 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. src/internal/poll/splice_linux.go

    		n, err := splice(pipefd, sock.Sysfd, max, spliceNonblock)
    		if err == syscall.EINTR {
    			continue
    		}
    		if err != syscall.EAGAIN {
    			return n, err
    		}
    		if sock.pd.pollable() {
    			if err := sock.pd.waitRead(sock.isFile); err != nil {
    				return n, err
    			}
    		}
    	}
    }
    
    // splicePump moves all the buffered data from a pipe to a socket.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  8. src/internal/poll/fd.go

    func (e *DeadlineExceededError) Temporary() bool { return true }
    
    // ErrNotPollable is returned when the file or socket is not suitable
    // for event notification.
    var ErrNotPollable = errors.New("not pollable")
    
    // consume removes data from a slice of byte slices, for writev.
    func consume(v *[][]byte, n int64) {
    	for len(*v) > 0 {
    		ln0 := int64(len((*v)[0]))
    		if ln0 > n {
    			(*v)[0] = (*v)[0][n:]
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:16:28 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  9. src/runtime/signal_solaris.go

    	/* 19 */ {_SigNotify, "SIGPWR: power-fail restart"},
    	/* 20 */ {_SigNotify + _SigIgn, "SIGWINCH: window size change"},
    	/* 21 */ {_SigNotify + _SigIgn, "SIGURG: urgent socket condition"},
    	/* 22 */ {_SigNotify, "SIGPOLL: pollable event occurred"},
    	/* 23 */ {0, "SIGSTOP: stop (cannot be caught or ignored)"},
    	/* 24 */ {_SigNotify + _SigDefault + _SigIgn, "SIGTSTP: user stop requested from tty"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 16 20:27:15 UTC 2019
    - 4.5K bytes
    - Viewed (0)
  10. src/internal/poll/fd_poll_runtime.go

    	return pd.wait('w', isFile)
    }
    
    func (pd *pollDesc) waitCanceled(mode int) {
    	if pd.runtimeCtx == 0 {
    		return
    	}
    	runtime_pollWaitCanceled(pd.runtimeCtx, mode)
    }
    
    func (pd *pollDesc) pollable() bool {
    	return pd.runtimeCtx != 0
    }
    
    // Error values returned by runtime_pollReset and runtime_pollWait.
    // These must match the values in runtime/netpoll.go.
    const (
    	pollNoError        = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:59 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top