- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 145 for O_RDONLY (0.13 sec)
-
src/time/sys_unix.go
// skipping the test altogether. if runtime.GOOS != "wasip1" { syscall.Kill(syscall.Getpid(), syscall.SIGCHLD) } } func open(name string) (uintptr, error) { fd, err := syscall.Open(name, syscall.O_RDONLY, 0) if err != nil { return 0, err } return uintptr(fd), nil } func read(fd uintptr, buf []byte) (int, error) { return syscall.Read(int(fd), buf) } func closefd(fd uintptr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:10 UTC 2023 - 1.4K bytes - Viewed (0) -
src/runtime/vdso_freebsd_x86.go
//go:systemstack func initHPETTimecounter(idx int) { const digits = "0123456789" var devPath [len(hpetDevPath)]byte copy(devPath[:], hpetDevPath) devPath[9] = digits[idx] 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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 1.9K bytes - Viewed (0) -
src/syscall/syscall_windows_test.go
dir := t.TempDir() h, err := syscall.Open(dir, syscall.O_RDONLY, 0) if err != nil { t.Fatalf("Open failed: %v", err) } syscall.CloseHandle(h) h, err = syscall.Open(dir, syscall.O_RDONLY|syscall.O_TRUNC, 0) if err == nil { t.Error("Open should have failed") } else { syscall.CloseHandle(h) } h, err = syscall.Open(dir, syscall.O_RDONLY|syscall.O_CREAT, 0) if err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 17 16:33:09 UTC 2023 - 5.7K bytes - Viewed (0) -
internal/lock/lock_windows.go
// acquire a write lock. func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { var lockType uint32 = lockFileFailImmediately | lockFileExclusiveLock if flag == syscall.O_RDONLY { // https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-lockfileex //lint:ignore SA4016 Reasons lockType = lockFileFailImmediately // Set this to enable shared lock and fail immediately. }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 7.9K bytes - Viewed (0) -
src/os/fifo_test.go
name := filepath.Join(dir, strconv.Itoa(i)) if err := syscall.Mkfifo(name, 0o600); err != nil { t.Fatal(err) } // The problem only occurs if we use O_NONBLOCK here. rd, err := os.OpenFile(name, os.O_RDONLY|syscall.O_NONBLOCK, 0o600) if err != nil { t.Fatal(err) } wr, err := os.OpenFile(name, os.O_WRONLY|syscall.O_NONBLOCK, 0o600) if err != nil { t.Fatal(err) } const msg = "message"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:47:23 UTC 2024 - 6.1K bytes - Viewed (0) -
internal/ioutil/read_file_noatime_notsupported.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 893 bytes - Viewed (0) -
cmd/xl-storage_noatime_notsupported.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 1K bytes - Viewed (0) -
src/time/sys_plan9.go
"syscall" ) // for testing: whatever interrupts a sleep func interrupt() { // cannot predict pid, don't want to kill group } func open(name string) (uintptr, error) { fd, err := syscall.Open(name, syscall.O_RDONLY) if err != nil { return 0, err } return uintptr(fd), nil } func read(fd uintptr, buf []byte) (int, error) { return syscall.Read(int(fd), buf) } func closefd(fd uintptr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 1016 bytes - Viewed (0) -
cmd/xl-storage_noatime_supported.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 1K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/lockedfile_filelock.go
// calls for Linux and Windows anyway, so it's simpler to use that approach // consistently. f, err := os.OpenFile(name, flag&^os.O_TRUNC, perm) if err != nil { return nil, err } switch flag & (os.O_RDONLY | os.O_WRONLY | os.O_RDWR) { case os.O_WRONLY, os.O_RDWR: err = filelock.Lock(f) default: err = filelock.RLock(f) } if err != nil { f.Close() return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 1.7K bytes - Viewed (0)