- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for WriteUnlock (0.17 sec)
-
src/os/file_mutex_plan9.go
if !file.fdmu.WriteLock() { return ErrClosed } return nil } // writeUnlock removes a reference from the file and unlocks it for writing. // It also closes the file if it is marked as closed and there is no remaining // reference. func (file *file) writeUnlock() { if file.fdmu.WriteUnlock() { file.destroy() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 08 03:57:40 UTC 2022 - 1.8K bytes - Viewed (0) -
src/internal/poll/file_plan9.go
} func (fdmu *FDMutex) ReadUnlock() bool { return fdmu.fdmu.rwunlock(true) } func (fdmu *FDMutex) WriteLock() bool { return fdmu.fdmu.rwlock(false) } func (fdmu *FDMutex) WriteUnlock() bool { return fdmu.fdmu.rwunlock(false)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 08 03:57:40 UTC 2022 - 972 bytes - Viewed (0) -
src/internal/poll/fd_unix.go
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) -
src/internal/poll/sendfile_linux.go
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 if int64(n) > remain { n = int(remain) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 1.4K bytes - Viewed (0) -
src/internal/poll/sendfile_solaris.go
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 if int64(n) > remain { n = int(remain) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 1.8K bytes - Viewed (0) -
src/internal/poll/writev.go
import ( "io" "runtime" "syscall" ) // Writev wraps the writev system call. func (fd *FD) Writev(v *[][]byte) (int64, 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 iovecs []syscall.Iovec if fd.iovecs != nil { iovecs = *fd.iovecs }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 18:23:49 UTC 2024 - 1.8K bytes - Viewed (0) -
src/internal/poll/fd_mutex.go
func (fd *FD) writeLock() error { if !fd.fdmu.rwlock(false) { return errClosing(fd.isFile) } return nil } // writeUnlock removes a reference from fd and unlocks fd for writing. // It also closes fd when the state of fd is set to closed and there // is no remaining reference. func (fd *FD) writeUnlock() { if fd.fdmu.rwunlock(false) { fd.destroy() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 20 16:55:30 UTC 2018 - 6.4K bytes - Viewed (0) -
src/internal/poll/sendfile_bsd.go
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 if int64(n) > remain { n = int(remain) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 1.5K bytes - Viewed (0) -
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 { return 0, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 2.2K bytes - Viewed (0) -
src/internal/poll/fd_windows.go
rawToSockaddrInet6(o.rsa, sa6) return n, err } // Write implements io.Writer. func (fd *FD) Write(buf []byte) (int, error) { if err := fd.writeLock(); err != nil { return 0, err } defer fd.writeUnlock() if fd.isFile { fd.l.Lock() defer fd.l.Unlock() } ntotal := 0 for len(buf) > 0 { b := buf if len(b) > maxRW { b = b[:maxRW] } var n int var err error
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 16:50:42 UTC 2024 - 34.1K bytes - Viewed (0)