Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for writeBlock (0.17 sec)

  1. src/compress/flate/deflate.go

    		}
    	}
    	n := copy(d.window[d.windowEnd:], b)
    	d.windowEnd += n
    	return n
    }
    
    func (d *compressor) writeBlock(tokens []token, index int) error {
    	if index > 0 {
    		var window []byte
    		if d.blockStart <= index {
    			window = d.window[d.blockStart:index]
    		}
    		d.blockStart = index
    		d.w.writeBlock(tokens, false, window)
    		return d.w.err
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  2. src/runtime/pprof/pprof.go

    	return n
    }
    
    // countMutex returns the number of records in the mutex profile.
    func countMutex() int {
    	n, _ := runtime.MutexProfile(nil)
    	return n
    }
    
    // writeBlock writes the current blocking profile to w.
    func writeBlock(w io.Writer, debug int) error {
    	return writeProfileInternal(w, debug, "contention", pprof_blockProfileInternal)
    }
    
    // writeMutex writes the current mutex profile to w.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/data.go

    func writeDatblkToOutBuf(ctxt *Link, out *OutBuf, addr int64, size int64) {
    	writeBlocks(ctxt, out, ctxt.outSem, ctxt.loader, ctxt.datap, addr, size, zeros[:])
    }
    
    func dwarfblk(ctxt *Link, out *OutBuf, addr int64, size int64) {
    	// Concatenate the section symbol lists into a single list to pass
    	// to writeBlocks.
    	//
    	// NB: ideally we would do a separate writeBlocks call for each
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 12 15:10:50 UTC 2024
    - 100.5K bytes
    - Viewed (0)
  4. src/internal/poll/fd_unix.go

    		}
    		err = fd.eofError(n, err)
    		return n, oobn, sysflags, err
    	}
    }
    
    // Write implements io.Writer.
    func (fd *FD) Write(p []byte) (int, error) {
    	if err := fd.writeLock(); err != nil {
    		return 0, err
    	}
    	defer fd.writeUnlock()
    	if err := fd.pd.prepareWrite(fd.isFile); err != nil {
    		return 0, err
    	}
    	var nn int
    	for {
    		max := len(p)
    		if fd.IsStream && max-nn > maxRW {
    			max = nn + maxRW
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 04:09:44 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  5. src/internal/poll/sendfile_linux.go

    func SendFile(dstFD *FD, src int, remain int64) (written int64, err error, handled bool) {
    	defer func() {
    		TestHookDidSendFile(dstFD, src, written, err, handled)
    	}()
    	if err := dstFD.writeLock(); err != nil {
    		return 0, err, false
    	}
    	defer dstFD.writeUnlock()
    
    	if err := dstFD.pd.prepareWrite(dstFD.isFile); err != nil {
    		return 0, err, false
    	}
    
    	dst := dstFD.Sysfd
    	for remain > 0 {
    		n := maxSendfileSize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  6. src/internal/poll/sendfile_solaris.go

    func SendFile(dstFD *FD, src int, pos, remain int64) (written int64, err error, handled bool) {
    	defer func() {
    		TestHookDidSendFile(dstFD, src, written, err, handled)
    	}()
    	if err := dstFD.writeLock(); err != nil {
    		return 0, err, false
    	}
    	defer dstFD.writeUnlock()
    
    	if err := dstFD.pd.prepareWrite(dstFD.isFile); err != nil {
    		return 0, err, false
    	}
    
    	dst := dstFD.Sysfd
    	for remain > 0 {
    		n := maxSendfileSize
    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/sendfile_bsd.go

    func SendFile(dstFD *FD, src int, pos, remain int64) (written int64, err error, handled bool) {
    	defer func() {
    		TestHookDidSendFile(dstFD, src, written, err, handled)
    	}()
    	if err := dstFD.writeLock(); err != nil {
    		return 0, err, false
    	}
    	defer dstFD.writeUnlock()
    
    	if err := dstFD.pd.prepareWrite(dstFD.isFile); err != nil {
    		return 0, err, false
    	}
    
    	dst := dstFD.Sysfd
    	for remain > 0 {
    		n := maxSendfileSize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  8. src/internal/poll/sendfile_windows.go

    		return 0, syscall.ESPIPE
    	}
    	if ft, _ := syscall.GetFileType(src); ft == syscall.FILE_TYPE_PIPE {
    		return 0, syscall.ESPIPE
    	}
    
    	if err := fd.writeLock(); err != nil {
    		return 0, err
    	}
    	defer fd.writeUnlock()
    
    	o := &fd.wop
    	o.handle = src
    
    	// TODO(brainman): skip calling syscall.Seek if OS allows it
    	curpos, err := syscall.Seek(o.handle, 0, io.SeekCurrent)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. src/internal/poll/copy_file_range_linux.go

    	// locks for both file descriptors (and why this whole machinery is
    	// in the internal/poll package to begin with).
    	if err := dst.writeLock(); err != nil {
    		return 0, err
    	}
    	defer dst.writeUnlock()
    	if err := src.readLock(); err != nil {
    		return 0, err
    	}
    	defer src.readUnlock()
    	var n int
    	for {
    		n, err = unix.CopyFileRange(src.Sysfd, nil, dst.Sysfd, nil, max, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 17:40:10 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. src/os/file_plan9.go

    // Since Plan 9 preserves message boundaries, never allow
    // a zero-byte write.
    func (f *File) write(b []byte) (n int, err error) {
    	if err := f.writeLock(); err != nil {
    		return 0, err
    	}
    	defer f.writeUnlock()
    	if len(b) == 0 {
    		return 0, nil
    	}
    	return fixCount(syscall.Write(f.fd, b))
    }
    
    // pwrite writes len(b) bytes to the File starting at byte offset off.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:35:30 UTC 2024
    - 16K bytes
    - Viewed (0)
Back to top