Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 38 for SetNonblock (0.14 sec)

  1. src/runtime/os_aix.go

    }
    
    //go:nosplit
    func fcntl(fd, cmd, arg int32) (int32, int32) {
    	r, errno := syscall3(&libc_fcntl, uintptr(fd), uintptr(cmd), uintptr(arg))
    	return int32(r), int32(errno)
    }
    
    //go:nosplit
    func setNonblock(fd int32) {
    	flags, _ := fcntl(fd, _F_GETFL, 0)
    	if flags != -1 {
    		fcntl(fd, _F_SETFL, flags|_O_NONBLOCK)
    	}
    }
    
    // sigPerThreadSyscall is only used on linux, so we assign a bogus signal
    // number.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  2. src/os/file_unix.go

    		// non-blocking mode.
    		if nonBlocking {
    			// See the comments on net_newUnixFile.
    			if kind == kindSock {
    				f.nonblock = true // tell Fd to return blocking descriptor
    			}
    		} else if err := syscall.SetNonblock(fd, true); err == nil {
    			f.nonblock = true
    			clearNonBlock = true
    		} else {
    			pollable = false
    		}
    	}
    
    	// An error here indicates a failure to register
    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/syscall/exec_unix.go

    	n = 0
    	for i, s := range ss {
    		bb[i] = &b[n]
    		copy(b[n:], s)
    		n += len(s) + 1
    	}
    	return bb, nil
    }
    
    func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
    
    func SetNonblock(fd int, nonblocking bool) (err error) {
    	flag, err := fcntl(fd, F_GETFL, 0)
    	if err != nil {
    		return err
    	}
    	if (flag&O_NONBLOCK != 0) == nonblocking {
    		return nil
    	}
    	if nonblocking {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. src/syscall/syscall_wasip1.go

    	clockProcessCPUTimeID
    	clockThreadCPUTimeID
    )
    
    //go:wasmimport wasi_snapshot_preview1 clock_time_get
    //go:noescape
    func clock_time_get(id clockid, precision timestamp, time unsafe.Pointer) Errno
    
    func SetNonblock(fd int, nonblocking bool) error {
    	flags, err := fd_fdstat_get_flags(fd)
    	if err != nil {
    		return err
    	}
    	if nonblocking {
    		flags |= FDFLAG_NONBLOCK
    	} else {
    		flags &^= FDFLAG_NONBLOCK
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  5. src/syscall/exec_windows.go

    		}
    		b = utf16.AppendRune(b, 0)
    	}
    	b = utf16.AppendRune(b, 0)
    	return b, nil
    }
    
    func CloseOnExec(fd Handle) {
    	SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
    }
    
    func SetNonblock(fd Handle, nonblocking bool) (err error) {
    	return nil
    }
    
    // FullPath retrieves the full path of the specified file.
    func FullPath(name string) (path string, err error) {
    	p, err := UTF16PtrFromString(name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 28 18:29:48 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  6. src/runtime/os_darwin.go

    	// buffer is somehow full we will not block in the signal handler.
    	// Leave the read end of the pipe blocking so that we will block
    	// in sigNoteSleep.
    	setNonblock(sigNoteWrite)
    }
    
    // sigNoteWakeup wakes up a thread sleeping on a note created by sigNoteSetup.
    func sigNoteWakeup(*note) {
    	var b byte
    	write(uintptr(sigNoteWrite), unsafe.Pointer(&b), 1)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/unix/syscall_unix.go

    	if err == nil {
    		fd[0] = int(fdx[0])
    		fd[1] = int(fdx[1])
    	}
    	return
    }
    
    var ioSync int64
    
    func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
    
    func SetNonblock(fd int, nonblocking bool) (err error) {
    	flag, err := fcntl(fd, F_GETFL, 0)
    	if err != nil {
    		return err
    	}
    	if (flag&O_NONBLOCK != 0) == nonblocking {
    		return nil
    	}
    	if nonblocking {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  8. src/internal/poll/fd_unix.go

    	// Atomic store so that concurrent calls to SetBlocking
    	// do not cause a race condition. isBlocking only ever goes
    	// from 0 to 1 so there is no real race here.
    	atomic.StoreUint32(&fd.isBlocking, 1)
    	return syscall.SetNonblock(fd.Sysfd, false)
    }
    
    // Darwin and FreeBSD can't read or write 2GB+ files at a time,
    // even on 64-bit systems.
    // The same is true of socket implementations on many systems.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 04:09:44 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  9. src/runtime/sys_darwin.go

    	return ret
    }
    func pthread_cond_signal_trampoline()
    
    // Not used on Darwin, but must be defined.
    func exitThread(wait *atomic.Uint32) {
    	throw("exitThread")
    }
    
    //go:nosplit
    func setNonblock(fd int32) {
    	flags, _ := fcntl(fd, _F_GETFL, 0)
    	if flags != -1 {
    		fcntl(fd, _F_SETFL, flags|_O_NONBLOCK)
    	}
    }
    
    func issetugid() int32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go

    	if err == nil {
    		fd[0] = int(fdx[0])
    		fd[1] = int(fdx[1])
    	}
    	return
    }
    
    var ioSync int64
    
    func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
    
    func SetNonblock(fd int, nonblocking bool) (err error) {
    	flag, err := fcntl(fd, F_GETFL, 0)
    	if err != nil {
    		return err
    	}
    	if nonblocking {
    		flag |= O_NONBLOCK
    	} else {
    		flag &= ^O_NONBLOCK
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 84.4K bytes
    - Viewed (0)
Back to top