diff options
author | 2024-03-04 09:42:11 +0000 | |
---|---|---|
committer | 2024-03-04 09:42:11 +0000 | |
commit | adb4cdcf6c9eacd369eaaf5b21774b198d57c040 (patch) | |
tree | a4f9c8fe2ce147fa952bcb795690afb9bb2affcb /vendor/modernc.org/libc/libc_linux_amd64.go | |
parent | [bugfix] update postgresqlstmt to correctly use postgres err hook (#2711) (diff) | |
download | gotosocial-adb4cdcf6c9eacd369eaaf5b21774b198d57c040.tar.xz |
[chore]: Bump modernc.org/sqlite from 1.28.0 to 1.29.2 (#2718)
Diffstat (limited to 'vendor/modernc.org/libc/libc_linux_amd64.go')
-rw-r--r-- | vendor/modernc.org/libc/libc_linux_amd64.go | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/vendor/modernc.org/libc/libc_linux_amd64.go b/vendor/modernc.org/libc/libc_linux_amd64.go index af96124d0..4aa055579 100644 --- a/vendor/modernc.org/libc/libc_linux_amd64.go +++ b/vendor/modernc.org/libc/libc_linux_amd64.go @@ -27,6 +27,9 @@ var ( // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + if __ccgo_strace { + trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2)) + } // musl/arch/x86_64/ksigaction.h // // struct k_sigaction { @@ -72,6 +75,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + if __ccgo_strace { + trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) + } var arg uintptr if args != 0 { arg = *(*uintptr)(unsafe.Pointer(args)) @@ -96,6 +102,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { // int lstat(const char *pathname, struct stat *statbuf); func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + if __ccgo_strace { + trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) @@ -112,6 +121,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { // int stat(const char *pathname, struct stat *statbuf); func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + if __ccgo_strace { + trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) @@ -128,6 +140,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { // int fstat(int fd, struct stat *statbuf); func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if __ccgo_strace { + trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: fd %d: %v", origin(1), fd, err) @@ -143,11 +158,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { } func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + if __ccgo_strace { + trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) + } return Xmmap64(t, addr, length, prot, flags, fd, offset) } // void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + if __ccgo_strace { + trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) + } data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) if err != 0 { // if dmesgs { @@ -165,6 +186,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o // void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */); func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr { + if __ccgo_strace { + trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2)) + } var arg uintptr if args != 0 { arg = *(*uintptr)(unsafe.Pointer(args)) @@ -186,6 +210,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags // int ftruncate(int fd, off_t length); func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 { + if __ccgo_strace { + trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 { // if dmesgs { // dmesg("%v: fd %d: %v", origin(1), fd, err) @@ -202,6 +229,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 { // off64_t lseek64(int fd, off64_t offset, int whence); func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + if __ccgo_strace { + trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) + } n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) if err != 0 { // if dmesgs { @@ -219,6 +249,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { // int utime(const char *filename, const struct utimbuf *times); func Xutime(t *TLS, filename, times uintptr) int32 { + if __ccgo_strace { + trc("t=%v times=%v, (%v:)", t, times, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 { t.setErrno(err) return -1 @@ -229,6 +262,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 { // unsigned int alarm(unsigned int seconds); func Xalarm(t *TLS, seconds uint32) uint32 { + if __ccgo_strace { + trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) + } n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) if err != 0 { panic(todo("")) @@ -239,6 +275,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 { // time_t time(time_t *tloc); func Xtime(t *TLS, tloc uintptr) types.Time_t { + if __ccgo_strace { + trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2)) + } n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0) if err != 0 { t.setErrno(err) @@ -253,6 +292,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t { // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if __ccgo_strace { + trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { t.setErrno(err) return -1 @@ -263,6 +305,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { // int mkdir(const char *path, mode_t mode); func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + if __ccgo_strace { + trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 { t.setErrno(err) return -1 @@ -276,6 +321,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { // int symlink(const char *target, const char *linkpath); func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + if __ccgo_strace { + trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 { t.setErrno(err) return -1 @@ -289,6 +337,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 { // int chmod(const char *pathname, mode_t mode) func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + if __ccgo_strace { + trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 { t.setErrno(err) return -1 @@ -302,6 +353,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { // int utimes(const char *filename, const struct timeval times[2]); func Xutimes(t *TLS, filename, times uintptr) int32 { + if __ccgo_strace { + trc("t=%v times=%v, (%v:)", t, times, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 { t.setErrno(err) return -1 @@ -315,6 +369,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 { // int unlink(const char *pathname); func Xunlink(t *TLS, pathname uintptr) int32 { + if __ccgo_strace { + trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 { t.setErrno(err) return -1 @@ -328,6 +385,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 { // int access(const char *pathname, int mode); func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + if __ccgo_strace { + trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) @@ -344,6 +404,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { // int rmdir(const char *pathname); func Xrmdir(t *TLS, pathname uintptr) int32 { + if __ccgo_strace { + trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 { t.setErrno(err) return -1 @@ -357,6 +420,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 { // int rename(const char *oldpath, const char *newpath); func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + if __ccgo_strace { + trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 { t.setErrno(err) return -1 @@ -367,6 +433,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 { // int mknod(const char *pathname, mode_t mode, dev_t dev); func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + if __ccgo_strace { + trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { t.setErrno(err) return -1 @@ -377,6 +446,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 // int chown(const char *pathname, uid_t owner, gid_t group); func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + if __ccgo_strace { + trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { t.setErrno(err) return -1 @@ -387,6 +459,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3 // int link(const char *oldpath, const char *newpath); func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + if __ccgo_strace { + trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { t.setErrno(err) return -1 @@ -397,6 +472,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 { // int pipe(int pipefd[2]); func Xpipe(t *TLS, pipefd uintptr) int32 { + if __ccgo_strace { + trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 { t.setErrno(err) return -1 @@ -407,6 +485,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 { // int dup2(int oldfd, int newfd); func Xdup2(t *TLS, oldfd, newfd int32) int32 { + if __ccgo_strace { + trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2)) + } n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if err != 0 { t.setErrno(err) @@ -418,6 +499,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 { // ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + if __ccgo_strace { + trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2)) + } n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize)) if err != 0 { t.setErrno(err) @@ -429,6 +513,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { // FILE *fopen64(const char *pathname, const char *mode); func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + if __ccgo_strace { + trc("t=%v mode=%v, (%v:)", t, mode, origin(2)) + } m := strings.ReplaceAll(GoString(mode), "b", "") var flags int switch m { @@ -465,16 +552,25 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { // int iswspace(wint_t wc); func Xiswspace(t *TLS, wc wctype.Wint_t) int32 { + if __ccgo_strace { + trc("t=%v wc=%v, (%v:)", t, wc, origin(2)) + } return Bool32(unicode.IsSpace(rune(wc))) } // int iswalnum(wint_t wc); func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 { + if __ccgo_strace { + trc("t=%v wc=%v, (%v:)", t, wc, origin(2)) + } return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc))) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if __ccgo_strace { + trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) + } if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { t.setErrno(err) return -1 @@ -636,6 +732,10 @@ var _table1 = [384]int32{ var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4 func X__ctype_tolower_loc(tls *TLS) (r uintptr) { + if __ccgo_strace { + trc("tls=%v, (%v:)", tls, origin(2)) + defer func() { trc("-> %v", r) }() + } return uintptr(unsafe.Pointer(&_ptable1)) } @@ -650,10 +750,16 @@ type Tin6_addr = struct { var Xin6addr_any = Tin6_addr{} func Xrewinddir(tls *TLS, f uintptr) { + if __ccgo_strace { + trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) + } Xfseek(tls, f, 0, stdio.SEEK_SET) } // clock_t clock(void); func Xclock(t *TLS) time.Clock_t { + if __ccgo_strace { + trc("t=%v, (%v:)", t, origin(2)) + } return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second) } |