- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for faketimeWrite (0.38 sec)
-
src/syscall/time_fake.go
// the runtime's write function, since that adds the framing that // reports the emulated time. //go:linkname runtimeWrite runtime.write func runtimeWrite(fd uintptr, p unsafe.Pointer, n int32) int32 func faketimeWrite(fd int, p []byte) int { var pp *byte if len(p) > 0 { pp = &p[0] } return int(runtimeWrite(uintptr(fd), unsafe.Pointer(pp), int32(len(p))))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 677 bytes - Viewed (0) -
src/syscall/time_nofake.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !faketime package syscall const faketime = false func faketimeWrite(fd int, p []byte) int { // This should never be called since faketime is false. panic("not implemented")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 351 bytes - Viewed (0) -
src/runtime/time_fake.go
// license that can be found in the LICENSE file. //go:build faketime && !windows // Faketime isn't currently supported on Windows. This would require // modifying syscall.Write to call syscall.faketimeWrite, // translating the Stdout and Stderr handles into FDs 1 and 2. // (See CL 192739 PS 3.) package runtime import "unsafe" // faketime is the simulated time in nanoseconds since 1970 for the // playground.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:15:13 UTC 2024 - 2.5K bytes - Viewed (0) -
src/syscall/syscall_plan9.go
return int(n) } func Read(fd int, p []byte) (n int, err error) { return Pread(fd, p, -1) } func Write(fd int, p []byte) (n int, err error) { if faketime && (fd == 1 || fd == 2) { n = faketimeWrite(fd, p) if n < 0 { return 0, ErrorString("error") } return n, nil } return Pwrite(fd, p, -1) } var ioSync int64 //sys fd2path(fd int, buf []byte) (err error)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 9.4K bytes - Viewed (0) -
src/syscall/fs_js.go
if err != nil { return 0, err } if f.seeked { n, err := Pwrite(fd, b, f.pos) f.pos += int64(n) return n, err } if faketime && (fd == 1 || fd == 2) { n := faketimeWrite(fd, b) if n < 0 { return 0, errnoErr(Errno(-n)) } return n, nil } buf := uint8Array.New(len(b)) js.CopyBytesToJS(buf, b) n, err := fsCall("write", fd, buf, 0, len(b), nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 11 18:19:17 UTC 2023 - 10.8K bytes - Viewed (0) -
src/syscall/syscall_unix.go
} return } func Write(fd int, p []byte) (n int, err error) { if race.Enabled { race.ReleaseMerge(unsafe.Pointer(&ioSync)) } if faketime && (fd == 1 || fd == 2) { n = faketimeWrite(fd, p) if n < 0 { n, err = 0, errnoErr(Errno(-n)) } } else { n, err = write(fd, p) } if race.Enabled && n > 0 { race.ReadRange(unsafe.Pointer(&p[0]), n) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 16:19:26 UTC 2024 - 12.2K bytes - Viewed (0)