Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 923 for closeFD (0.23 sec)

  1. src/runtime/os_plan9.go

    	fd := open(&buf[0], _OWRITE, 0)
    	if fd < 0 {
    		return -1
    	}
    	len := findnull(&msg[0])
    	if write1(uintptr(fd), unsafe.Pointer(&msg[0]), int32(len)) != int32(len) {
    		closefd(fd)
    		return -1
    	}
    	closefd(fd)
    	return 0
    }
    
    //go:nosplit
    func exit(e int32) {
    	var status []byte
    	if e == 0 {
    		status = emptystatus
    	} else {
    		// build error string
    		var tmp [32]byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. src/runtime/stubs2.go

    	"unsafe"
    )
    
    // read calls the read system call.
    // It returns a non-negative number of bytes written or a negative errno value.
    func read(fd int32, p unsafe.Pointer, n int32) int32
    
    func closefd(fd int32) int32
    
    func exit(code int32)
    func usleep(usec uint32)
    
    //go:nosplit
    func usleep_no_g(usec uint32) {
    	usleep(usec)
    }
    
    // write1 calls the write system call.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. src/runtime/vdso_freebsd_x86.go

    	fd := open(&devPath[0], 0 /* O_RDONLY */ |_O_CLOEXEC, 0)
    	if fd < 0 {
    		atomic.Casuintptr(&hpetDevMap[idx], 0, ^uintptr(0))
    		return
    	}
    
    	addr, mmapErr := mmap(nil, physPageSize, _PROT_READ, _MAP_SHARED, fd, 0)
    	closefd(fd)
    	newP := uintptr(addr)
    	if mmapErr != 0 {
    		newP = ^uintptr(0)
    	}
    	if !atomic.Casuintptr(&hpetDevMap[idx], 0, newP) && mmapErr == 0 {
    		munmap(addr, physPageSize)
    	}
    }
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. src/runtime/os_wasm.go

    func sigignore(uint32)               {}
    
    // Stubs so tests can link correctly. These should never be called.
    func open(name *byte, mode, perm int32) int32        { panic("not implemented") }
    func closefd(fd int32) int32                         { panic("not implemented") }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. src/runtime/os_openbsd_syscall2.go

    func thrkill(tid int32, sig int)
    
    // read calls the read system call.
    // It returns a non-negative number of bytes written or a negative errno value.
    func read(fd int32, p unsafe.Pointer, n int32) int32
    
    func closefd(fd int32) int32
    
    func exit(code int32)
    func usleep(usec uint32)
    
    //go:nosplit
    func usleep_no_g(usec uint32) {
    	usleep(usec)
    }
    
    // write1 calls the write system call.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  6. src/runtime/os_openbsd.go

    }
    
    var urandom_dev = []byte("/dev/urandom\x00")
    
    //go:nosplit
    func readRandom(r []byte) int {
    	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
    	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
    	closefd(fd)
    	return int(n)
    }
    
    func goenvs() {
    	goenvs_unix()
    }
    
    // Called to initialize a new m (including the bootstrap m).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. src/runtime/os3_solaris.go

    }
    
    var urandom_dev = []byte("/dev/urandom\x00")
    
    //go:nosplit
    func readRandom(r []byte) int {
    	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
    	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
    	closefd(fd)
    	return int(n)
    }
    
    func goenvs() {
    	goenvs_unix()
    }
    
    // Called to initialize a new m (including the bootstrap m).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  8. src/runtime/sys_openbsd2.go

    	ret = libcCall(unsafe.Pointer(abi.FuncPCABI0(open_trampoline)), unsafe.Pointer(&name))
    	KeepAlive(name)
    	return
    }
    func open_trampoline()
    
    //go:nosplit
    //go:cgo_unsafe_args
    func closefd(fd int32) int32 {
    	return libcCall(unsafe.Pointer(abi.FuncPCABI0(close_trampoline)), unsafe.Pointer(&fd))
    }
    func close_trampoline()
    
    //go:nosplit
    //go:cgo_unsafe_args
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. src/runtime/os_aix.go

    }
    
    var urandom_dev = []byte("/dev/urandom\x00")
    
    //go:nosplit
    func readRandom(r []byte) int {
    	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
    	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
    	closefd(fd)
    	return int(n)
    }
    
    func goenvs() {
    	goenvs_unix()
    }
    
    /* SIGNAL */
    
    const (
    	_NSIG = 256
    )
    
    // sigtramp is a function descriptor to _sigtramp defined in assembly
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. src/time/zoneinfo_read.go

    // in the given uncompressed zip file.
    func loadTzinfoFromZip(zipfile, name string) ([]byte, error) {
    	fd, err := open(zipfile)
    	if err != nil {
    		return nil, err
    	}
    	defer closefd(fd)
    
    	const (
    		zecheader = 0x06054b50
    		zcheader  = 0x02014b50
    		ztailsize = 22
    
    		zheadersize = 30
    		zheader     = 0x04034b50
    	)
    
    	buf := make([]byte, ztailsize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 14.4K bytes
    - Viewed (0)
Back to top