File size: 1,046 Bytes
42fb483 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ; syscall.inc — Linux x86_64 syscall numbers and constants
; OBSERVED: from installer OS detection + ABI documentation
; File descriptors
%define STDIN 0
%define STDOUT 1
%define STDERR 2
; Syscall numbers (x86_64 Linux)
%define SYS_READ 0
%define SYS_WRITE 1
%define SYS_OPEN 2
%define SYS_CLOSE 3
%define SYS_STAT 4
%define SYS_LSTAT 6
%define SYS_MMAP 9
%define SYS_MUNMAP 11
%define SYS_BRK 12
%define SYS_IOCTL 16
%define SYS_GETDENTS64 217
%define SYS_MKDIR 83
%define SYS_EXIT 60
%define SYS_EXIT_GROUP 231
%define SYS_GETPID 39
%define SYS_FORK 57
%define SYS_EXECVE 59
%define SYS_WAIT4 61
%define SYS_SOCKET 41
%define SYS_CONNECT 42
%define SYS_ACCEPT 43
%define SYS_BIND 49
%define SYS_LISTEN 50
; ioctl terminal
%define TCGETS 0x5401
%define TCSETS 0x5402
%define TIOCGWINSZ 0x5413
; mmap flags
%define PROT_READ 0x1
%define PROT_WRITE 0x2
%define MAP_PRIVATE 0x2
%define MAP_ANON 0x20
|