Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 51 for int4ref (4.23 sec)

  1. src/internal/poll/fd_posix.go

    	}
    	return err
    }
    
    // Shutdown wraps syscall.Shutdown.
    func (fd *FD) Shutdown(how int) error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return syscall.Shutdown(fd.Sysfd, how)
    }
    
    // Fchown wraps syscall.Fchown.
    func (fd *FD) Fchown(uid, gid int) error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return ignoringEINTR(func() error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:17 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. internal/net/net.go

    func GetInterfaceNetStats(interf string) (procfs.NetDevLine, error) {
    	proc, err := procfs.Self()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	netDev, err := proc.NetDev()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	ndl, ok := netDev[interf]
    	if !ok {
    		return procfs.NetDevLine{}, fmt.Errorf("%v interface not found", interf)
    	}
    	return ndl, nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jul 17 08:14:01 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. operator/pkg/translate/yaml_tree.go

    // tree, translated and overlaid on the output tree.
    func YAMLTree(inTreeStr, outTreeStr string, translations map[string]string) (string, error) {
    	inTree := make(map[string]any)
    	if err := yaml.Unmarshal([]byte(inTreeStr), &inTree); err != nil {
    		return "", err
    	}
    	outTree := make(map[string]any)
    	if err := yaml.Unmarshal([]byte(outTreeStr), &outTree); err != nil {
    		return "", err
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  4. src/internal/poll/fd_mutex_test.go

    	ensurePanics(func() { mu.RWUnlock(false) })
    
    	ensurePanics(func() { mu.Incref(); mu.Decref(); mu.Decref() })
    	ensurePanics(func() { mu.RWLock(true); mu.RWUnlock(true); mu.RWUnlock(true) })
    	ensurePanics(func() { mu.RWLock(false); mu.RWUnlock(false); mu.RWUnlock(false) })
    
    	// ensure that it's still not broken
    	mu.Incref()
    	mu.Decref()
    	mu.RWLock(true)
    	mu.RWUnlock(true)
    	mu.RWLock(false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 08 03:57:40 UTC 2022
    - 4K bytes
    - Viewed (0)
  5. src/internal/poll/export_test.go

    // the internal/poll tests can not be in package poll.
    
    package poll
    
    var Consume = consume
    
    type XFDMutex struct {
    	fdMutex
    }
    
    func (mu *XFDMutex) Incref() bool {
    	return mu.incref()
    }
    
    func (mu *XFDMutex) IncrefAndClose() bool {
    	return mu.increfAndClose()
    }
    
    func (mu *XFDMutex) Decref() bool {
    	return mu.decref()
    }
    
    func (mu *XFDMutex) RWLock(read bool) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 08 03:57:40 UTC 2022
    - 714 bytes
    - Viewed (0)
  6. src/internal/poll/fd_mutex.go

    //
    // Misc operations must do incref/decref.
    // Misc operations include functions like setsockopt and setDeadline.
    // They need to use incref/decref to ensure that they operate on the
    // correct fd in presence of a concurrent close call (otherwise fd can
    // be closed under their feet).
    //
    // Close operations must do increfAndClose/decref.
    
    // incref adds a reference to mu.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 20 16:55:30 UTC 2018
    - 6.4K bytes
    - Viewed (0)
  7. src/internal/poll/fd_unixjs.go

    func (fd *FD) Fchdir() error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return syscall.Fchdir(fd.Sysfd)
    }
    
    // ReadDirent wraps syscall.ReadDirent.
    // We treat this like an ordinary system call rather than a call
    // that tries to fill the buffer.
    func (fd *FD) ReadDirent(buf []byte) (int, error) {
    	if err := fd.incref(); err != nil {
    		return 0, err
    	}
    	defer fd.decref()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 2K bytes
    - Viewed (0)
  8. src/internal/poll/sockoptip.go

    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return syscall.SetsockoptIPMreq(fd.Sysfd, level, name, mreq)
    }
    
    // SetsockoptIPv6Mreq wraps the setsockopt network call with an IPv6Mreq argument.
    func (fd *FD) SetsockoptIPv6Mreq(level, name int, mreq *syscall.IPv6Mreq) error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 817 bytes
    - Viewed (0)
  9. src/internal/poll/file_plan9.go

    // but we still want the locking semantics that fdMutex provides.
    
    // FDMutex is an exported fdMutex, only for Plan 9.
    type FDMutex struct {
    	fdmu fdMutex
    }
    
    func (fdmu *FDMutex) Incref() bool {
    	return fdmu.fdmu.incref()
    }
    
    func (fdmu *FDMutex) Decref() bool {
    	return fdmu.fdmu.decref()
    }
    
    func (fdmu *FDMutex) IncrefAndClose() bool {
    	return fdmu.fdmu.increfAndClose()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 08 03:57:40 UTC 2022
    - 972 bytes
    - Viewed (0)
  10. src/internal/poll/sockopt_unix.go

    //go:build unix
    
    package poll
    
    import "syscall"
    
    // SetsockoptByte wraps the setsockopt network call with a byte argument.
    func (fd *FD) SetsockoptByte(level, name int, arg byte) error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return syscall.SetsockoptByte(fd.Sysfd, level, name, arg)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 480 bytes
    - Viewed (0)
Back to top