Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for nonblockingPipe (0.24 sec)

  1. src/runtime/nbpipe_test.go

    //go:build unix
    
    package runtime_test
    
    import (
    	"runtime"
    	"syscall"
    	"testing"
    	"unsafe"
    )
    
    func TestNonblockingPipe(t *testing.T) {
    	// NonblockingPipe is the test name for nonblockingPipe.
    	r, w, errno := runtime.NonblockingPipe()
    	if errno != 0 {
    		t.Fatal(syscall.Errno(errno))
    	}
    	defer runtime.Close(w)
    
    	checkIsPipe(t, r, w)
    	checkNonblocking(t, r, "reader")
    	checkCloseonexec(t, r, "reader")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 20:32:54 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. src/runtime/nbpipe_pipe2.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris
    
    package runtime
    
    func nonblockingPipe() (r, w int32, errno int32) {
    	return pipe2(_O_NONBLOCK | _O_CLOEXEC)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 03 20:47:17 UTC 2022
    - 344 bytes
    - Viewed (0)
  3. src/runtime/export_unix_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package runtime
    
    import "unsafe"
    
    var NonblockingPipe = nonblockingPipe
    var Fcntl = fcntl
    var Closeonexec = closeonexec
    
    func sigismember(mask *sigset, i int) bool {
    	clear := *mask
    	sigdelset(&clear, i)
    	return clear != *mask
    }
    
    func Sigisblocked(i int) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 21:27:51 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  4. src/runtime/nbpipe_pipe.go

    // Copyright 2019 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build aix || darwin
    
    package runtime
    
    func nonblockingPipe() (r, w int32, errno int32) {
    	r, w, errno = pipe()
    	if errno != 0 {
    		return -1, -1, errno
    	}
    	closeonexec(r)
    	setNonblock(r)
    	closeonexec(w)
    	setNonblock(w)
    	return r, w, errno
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 405 bytes
    - Viewed (0)
  5. src/runtime/netpoll_kqueue_pipe.go

    // via uname(3) and fall back to the pipe if the kernel version is older than 10.0.
    
    var netpollBreakRd, netpollBreakWr uintptr // for netpollBreak
    
    func addWakeupEvent(kq int32) {
    	r, w, errno := nonblockingPipe()
    	if errno != 0 {
    		println("runtime: pipe failed with", -errno)
    		throw("runtime: pipe failed")
    	}
    	ev := keventt{
    		filter: _EVFILT_READ,
    		flags:  _EV_ADD,
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 21:17:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. src/runtime/netpoll_aix.go

    	wrwake         int32
    	pendingUpdates int32
    
    	netpollWakeSig atomic.Uint32 // used to avoid duplicate calls of netpollBreak
    )
    
    func netpollinit() {
    	// Create the pipe we use to wakeup poll.
    	r, w, errno := nonblockingPipe()
    	if errno != 0 {
    		throw("netpollinit: failed to create pipe")
    	}
    	rdwake = r
    	wrwake = w
    
    	// Pre-allocate array of pollfd structures for poll.
    	pfds = make([]pollfd, 1, 128)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top