Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for remSign (0.22 sec)

  1. src/internal/poll/sendfile_linux.go

    	if err := dstFD.pd.prepareWrite(dstFD.isFile); err != nil {
    		return 0, err, false
    	}
    
    	dst := dstFD.Sysfd
    	for remain > 0 {
    		n := maxSendfileSize
    		if int64(n) > remain {
    			n = int(remain)
    		}
    		n, err = syscall.Sendfile(dst, src, nil, n)
    		if n > 0 {
    			written += int64(n)
    			remain -= int64(n)
    			continue
    		} else if err != syscall.EAGAIN && err != syscall.EINTR {
    			// This includes syscall.ENOSYS (no kernel
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. src/os/zero_copy_linux.go

    	}
    
    	written, handled, err = pollSplice(&f.pfd, pfd, remain)
    
    	if lr != nil {
    		lr.N = remain - written
    	}
    
    	return written, handled, wrapSyscallError("splice", err)
    }
    
    func (f *File) copyFileRange(r io.Reader) (written int64, handled bool, err error) {
    	var (
    		remain int64
    		lr     *io.LimitedReader
    	)
    	if lr, r, remain = tryLimitedReader(r); remain <= 0 {
    		return 0, true, nil
    	}
    
    	var src *File
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. src/net/sendfile_linux.go

    //
    // if handled == false, sendFile performed no work.
    func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
    	var remain int64 = 1<<63 - 1 // by default, copy until EOF
    
    	lr, ok := r.(*io.LimitedReader)
    	if ok {
    		remain, r = lr.N, lr.R
    		if remain <= 0 {
    			return 0, nil, true
    		}
    	}
    	f, ok := r.(*os.File)
    	if !ok {
    		return 0, nil, false
    	}
    
    	sc, err := f.SyscallConn()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. src/net/sendfile_unix_alt.go

    	// loop back to the beginning ad nauseam until it's sent
    	// exactly the number of bytes told to. As such, we need to
    	// know exactly how many bytes to send.
    	var remain int64 = 0
    
    	lr, ok := r.(*io.LimitedReader)
    	if ok {
    		remain, r = lr.N, lr.R
    		if remain <= 0 {
    			return 0, nil, true
    		}
    	}
    	// r might be an *os.File or an os.fileWithoutWriteTo.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. src/internal/poll/sendfile_bsd.go

    		return 0, err, false
    	}
    
    	dst := dstFD.Sysfd
    	for remain > 0 {
    		n := maxSendfileSize
    		if int64(n) > remain {
    			n = int(remain)
    		}
    		pos1 := pos
    		n, err = syscall.Sendfile(dst, src, &pos1, n)
    		if n > 0 {
    			pos += int64(n)
    			written += int64(n)
    			remain -= int64(n)
    		}
    		if err == syscall.EINTR {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. src/internal/poll/sendfile_solaris.go

    	}
    
    	dst := dstFD.Sysfd
    	for remain > 0 {
    		n := maxSendfileSize
    		if int64(n) > remain {
    			n = int(remain)
    		}
    		pos1 := pos
    		n, err = syscall.Sendfile(dst, src, &pos1, n)
    		if err == syscall.EAGAIN || err == syscall.EINTR {
    			// partial write may have occurred
    			n = int(pos1 - pos)
    		}
    		if n > 0 {
    			pos += int64(n)
    			written += int64(n)
    			remain -= int64(n)
    			continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. src/internal/poll/copy_file_range_linux.go

    const maxCopyFileRangeRound = 1 << 30
    
    // CopyFileRange copies at most remain bytes of data from src to dst, using
    // the copy_file_range system call. dst and src must refer to regular files.
    func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err error) {
    	if !isKernelVersionGE53() {
    		return 0, false, nil
    	}
    
    	for remain > 0 {
    		max := remain
    		if max > maxCopyFileRangeRound {
    			max = maxCopyFileRangeRound
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 17:40:10 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. src/net/splice_linux.go

    //
    // If spliceFrom returns handled == false, it has performed no work.
    func spliceFrom(c *netFD, r io.Reader) (written int64, err error, handled bool) {
    	var remain int64 = 1<<63 - 1 // by default, copy until EOF
    	lr, ok := r.(*io.LimitedReader)
    	if ok {
    		remain, r = lr.N, lr.R
    		if remain <= 0 {
    			return 0, nil, true
    		}
    	}
    
    	var s *netFD
    	switch v := r.(type) {
    	case *TCPConn:
    		s = v.fd
    	case tcpConnWithoutWriteTo:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  9. src/internal/poll/splice_linux.go

    	if err != nil {
    		return 0, false, err
    	}
    	defer putPipe(p)
    	var inPipe, n int
    	for err == nil && remain > 0 {
    		max := maxSpliceSize
    		if int64(max) > remain {
    			max = int(remain)
    		}
    		inPipe, err = spliceDrain(p.wfd, src, max)
    		// The operation is considered handled if splice returns no
    		// error, or an error other than EINVAL. An EINVAL means the
    		// kernel does not support splice for the socket type of src.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. cmd/service.go

    // For each call, unfreezeServices must be called once.
    func freezeServices() {
    	// Use atomics for globalServiceFreeze, so we can read without locking.
    	// We need a lock since we are need the 2 atomic values to remain in sync.
    	globalServiceFreezeMu.Lock()
    	// If multiple calls, first one creates channel.
    	globalServiceFreezeCnt++
    	if globalServiceFreezeCnt == 1 {
    		globalServiceFreeze.Store(make(chan struct{}))
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Feb 28 07:02:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top