package core:sys/linux

Warning: This was generated for -target:linux_arm64 and might not represet every target this package supports.

⌘K
Ctrl+K
or
/

    Index

    Types (283)
    Constants (512)
    Variables (0)

    This section is empty.

    Procedures (273)

    Types

    Address_Family ¶

    Address_Family :: enum u16 {
    	UNSPEC     = 0, 
    	LOCAL      = 1, 
    	UNIX       = 1, 
    	FILE       = 1, 
    	INET       = 2, 
    	AX25       = 3, 
    	IPX        = 4, 
    	APPLETALK  = 5, 
    	NETROM     = 6, 
    	BRIDGE     = 7, 
    	ATMPVC     = 8, 
    	X25        = 9, 
    	INET6      = 10, 
    	ROSE       = 11, 
    	DECnet     = 12, 
    	NETBEUI    = 13, 
    	SECURITY   = 14, 
    	KEY        = 15, 
    	NETLINK    = 16, 
    	ROUTE      = 16, 
    	PACKET     = 17, 
    	ASH        = 18, 
    	ECONET     = 19, 
    	ATMSVC     = 20, 
    	RDS        = 21, 
    	SNA        = 22, 
    	IRDA       = 23, 
    	PPPOX      = 24, 
    	WANPIPE    = 25, 
    	LLC        = 26, 
    	IB         = 27, 
    	MPLS       = 28, 
    	CAN        = 29, 
    	TIPC       = 30, 
    	BLUETOOTH  = 31, 
    	IUCV       = 32, 
    	RXRPC      = 33, 
    	ISDN       = 34, 
    	PHONET     = 35, 
    	IEEE802154 = 36, 
    	CAIF       = 37, 
    	ALG        = 38, 
    	NFC        = 39, 
    	VSOCK      = 40, 
    	KCM        = 41, 
    	QIPCRTR    = 42, 
    	SMC        = 43, 
    	XDP        = 44, 
    	MCTP       = 45, 
    }
     

    Address family for the socket. Typically there's one address family for every protocol family.

    Related Procedures With Parameters

    Branch_Sample_Type ¶

    Branch_Sample_Type :: bit_set[Branch_Sample_Type_Bits; u64]
     

    Specifies which branches to include in branch record.

    Branch_Sample_Type_Bits ¶

    Branch_Sample_Type_Bits :: enum int {
    	USER       = 0, 
    	KERNEL     = 1, 
    	HV         = 2, 
    	ANY        = 3, 
    	ANY_CALL   = 4, 
    	ANY_RETURN = 5, 
    	IND_CALL   = 6, 
    	ABORT_TX   = 7, 
    	IN_TX      = 8, 
    	NO_TX      = 9, 
    	COND       = 10, 
    	CALL_STACK = 11, 
    	IND_JUMP   = 12, 
    	CALL       = 13, 
    	NO_FLAGS   = 14, 
    	NO_CYCLES  = 15, 
    	TYPE_SAVE  = 16, 
    	HW_INDEX   = 17, 
    	PRIV_SAVE  = 18, 
    }
     

    Bits for Branch_Sample_Type

    Clock_Id ¶

    Clock_Id :: enum int {
    	REALTIME           = 0, 
    	MONOTONIC          = 1, 
    	PROCESS_CPUTIME_ID = 2, 
    	THREAD_CPUTIME_ID  = 3, 
    	MONOTONIC_RAW      = 4, 
    	REALTIME_COARSE    = 5, 
    	MONOTONIC_COARSE   = 6, 
    	BOOTTIME           = 7, 
    	REALTIME_ALARM     = 8, 
    	BOOTTIME_ALARM     = 9, 
    }
     

    Clock IDs for various system clocks.

    Related Procedures With Parameters

    Close_Range_Flags ¶

    Close_Range_Flags :: bit_set[Close_Range_Flags_Bits; u32]
     

    Flags for close_range(2).

    Close_Range_Flags_Bits ¶

    Close_Range_Flags_Bits :: enum int {
    	CLOEXEC = 2, 
    	UNSHARE = 1, 
    }
     

    Bits for Close_Range_Flags

    Dev ¶

    Dev :: distinct int
     

    Type for storage device handle.

    Related Procedures With Parameters

    Dirent ¶

    Dirent :: struct {
    	ino:    Inode,
    	off:    i64,
    	reclen: u16,
    	type:   Dirent_Type,
    	name:   [0]u8,
    }
     

    Directory entry record. Recommended iterate these with dirent_iterator(), and obtain the name via dirent_name().

    Related Procedures With Parameters
    Related Procedures With Returns

    Dirent_Type ¶

    Dirent_Type :: enum u8 {
    	UNKNOWN = 0, 
    	FIFO    = 1, 
    	CHR     = 2, 
    	DIR     = 4, 
    	BLK     = 6, 
    	REG     = 8, 
    	LNK     = 10, 
    	SOCK    = 12, 
    	WHT     = 14, 
    }
     

    Type of the file in a directory entry

    EPoll_Ctl_Opcode ¶

    EPoll_Ctl_Opcode :: enum i32 {
    	ADD = 1, 
    	DEL = 2, 
    	MOD = 3, 
    }
    Related Procedures With Parameters

    EPoll_Data ¶

    EPoll_Data :: struct #raw_union {
    	ptr: rawptr,
    	fd:  Fd,
    	u32: u32,
    	u64: u64,
    }

    EPoll_Event ¶

    EPoll_Event :: struct #packed {
    	events: EPoll_Event_Kind,
    	data:   EPoll_Data,
    }
    Related Procedures With Parameters

    EPoll_Event_Kind ¶

    EPoll_Event_Kind :: enum u32 {
    	IN        = 1, 
    	PRI       = 2, 
    	OUT       = 4, 
    	RDNORM    = 64, 
    	RDBAND    = 128, 
    	WRNORM    = 256, 
    	WRBAND    = 512, 
    	MSG       = 1024, 
    	ERR       = 8, 
    	HUP       = 16, 
    	RDHUP     = 8192, 
    	EXCLUSIVE = 268435456, 
    	WAKEUP    = 536870912, 
    	ONESHOT   = 1073741824, 
    	ET        = 2147483648, 
    }

    EPoll_Flags ¶

    EPoll_Flags :: bit_set[EPoll_Flags_Bits; i32]
     

    Flags for epoll_create(2) syscall.

    EPoll_Flags_Bits ¶

    EPoll_Flags_Bits :: enum int {
    	FDCLOEXEC = 19, 
    }
     

    Bits for epoll_create(2) flags.

    Errno ¶

    Errno :: enum i32 {
    	NONE            = 0, 
    	// Errno-base
    	EPERM           = 1, 
    	ENOENT          = 2, 
    	ESRCH           = 3, 
    	EINTR           = 4, 
    	EIO             = 5, 
    	ENXIO           = 6, 
    	E2BIG           = 7, 
    	ENOEXEC         = 8, 
    	EBADF           = 9, 
    	ECHILD          = 10, 
    	EAGAIN          = 11, 
    	ENOMEM          = 12, 
    	EACCES          = 13, 
    	EFAULT          = 14, 
    	ENOTBLK         = 15, 
    	EBUSY           = 16, 
    	EEXIST          = 17, 
    	EXDEV           = 18, 
    	ENODEV          = 19, 
    	ENOTDIR         = 20, 
    	EISDIR          = 21, 
    	EINVAL          = 22, 
    	ENFILE          = 23, 
    	EMFILE          = 24, 
    	ENOTTY          = 25, 
    	ETXTBSY         = 26, 
    	EFBIG           = 27, 
    	ENOSPC          = 28, 
    	ESPIPE          = 29, 
    	EROFS           = 30, 
    	EMLINK          = 31, 
    	EPIPE           = 32, 
    	EDOM            = 33, 
    	ERANGE          = 34, 
    	// Linux
    	EDEADLK         = 35, 
    	ENAMETOOLONG    = 36, 
    	ENOLCK          = 37, 
    	ENOSYS          = 38, 
    	ENOTEMPTY       = 39, 
    	ELOOP           = 40, 
    	EUNKNOWN_41     = 41, 
    	ENOMSG          = 42, 
    	EIDRM           = 43, 
    	ECHRNG          = 44, 
    	EL2NSYNC        = 45, 
    	EL3HLT          = 46, 
    	EL3RST          = 47, 
    	ELNRNG          = 48, 
    	EUNATCH         = 49, 
    	ENOCSI          = 50, 
    	EL2HLT          = 51, 
    	EBADE           = 52, 
    	EBADR           = 53, 
    	EXFULL          = 54, 
    	ENOANO          = 55, 
    	EBADRQC         = 56, 
    	EBADSLT         = 57, 
    	EUNKNOWN_58     = 58, 
    	EBFONT          = 59, 
    	ENOSTR          = 60, 
    	ENODATA         = 61, 
    	ETIME           = 62, 
    	ENOSR           = 63, 
    	ENONET          = 64, 
    	ENOPKG          = 65, 
    	EREMOTE         = 66, 
    	ENOLINK         = 67, 
    	EADV            = 68, 
    	ESRMNT          = 69, 
    	ECOMM           = 70, 
    	EPROTO          = 71, 
    	EMULTIHOP       = 72, 
    	EDOTDOT         = 73, 
    	EBADMSG         = 74, 
    	EOVERFLOW       = 75, 
    	ENOTUNIQ        = 76, 
    	EBADFD          = 77, 
    	EREMCHG         = 78, 
    	ELIBACC         = 79, 
    	ELIBBAD         = 80, 
    	ELIBSCN         = 81, 
    	ELIBMAX         = 82, 
    	ELIBEXEC        = 83, 
    	EILSEQ          = 84, 
    	ERESTART        = 85, 
    	ESTRPIPE        = 86, 
    	EUSERS          = 87, 
    	ENOTSOCK        = 88, 
    	EDESTADDRREQ    = 89, 
    	EMSGSIZE        = 90, 
    	EPROTOTYPE      = 91, 
    	ENOPROTOOPT     = 92, 
    	EPROTONOSUPPORT = 93, 
    	ESOCKTNOSUPPORT = 94, 
    	EOPNOTSUPP      = 95, 
    	EPFNOSUPPORT    = 96, 
    	EAFNOSUPPORT    = 97, 
    	EADDRINUSE      = 98, 
    	EADDRNOTAVAIL   = 99, 
    	ENETDOWN        = 100, 
    	ENETUNREACH     = 101, 
    	ENETRESET       = 102, 
    	ECONNABORTED    = 103, 
    	ECONNRESET      = 104, 
    	ENOBUFS         = 105, 
    	EISCONN         = 106, 
    	ENOTCONN        = 107, 
    	ESHUTDOWN       = 108, 
    	ETOOMANYREFS    = 109, 
    	ETIMEDOUT       = 110, 
    	ECONNREFUSED    = 111, 
    	EHOSTDOWN       = 112, 
    	EHOSTUNREACH    = 113, 
    	EALREADY        = 114, 
    	EINPROGRESS     = 115, 
    	ESTALE          = 116, 
    	EUCLEAN         = 117, 
    	ENOTNAM         = 118, 
    	ENAVAIL         = 119, 
    	EISNAM          = 120, 
    	EREMOTEIO       = 121, 
    	EDQUOT          = 122, 
    	ENOMEDIUM       = 123, 
    	EMEDIUMTYPE     = 124, 
    	ECANCELED       = 125, 
    	ENOKEY          = 126, 
    	EKEYEXPIRED     = 127, 
    	EKEYREVOKED     = 128, 
    	EKEYREJECTED    = 129, 
    	EOWNERDEAD      = 130, 
    	ENOTRECOVERABLE = 131, 
    	ERFKILL         = 132, 
    	EHWPOISON       = 133, 
    	// Errno aliases
    	EWOULDBLOCK     = 11, 
    	EDEADLOCK       = 35, 
    }
     

    Represents an error returned by most of syscalls

    Related Procedures With Returns

    Execveat_Flags ¶

    Execveat_Flags :: bit_set[Execveat_Flags_Bits; i32]
     

    Flags for execveat(2) syscall.

    Execveat_Flags_Bits ¶

    Execveat_Flags_Bits :: enum int {
    	AT_SYMLINK_NOFOLLOW = 8, 
    	AT_EMPTY_PATH       = 12, 
    }
     

    Bits for execveat(2) flags.

    FCntl_Command ¶

    FCntl_Command :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
     

    Command for fcntl(2)

    FCntl_Command_ADD_SEALS ¶

    FCntl_Command_ADD_SEALS :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_DUPFD ¶

    FCntl_Command_DUPFD :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_DUPFD_CLOEXEC ¶

    FCntl_Command_DUPFD_CLOEXEC :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETFD ¶

    FCntl_Command_GETFD :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETFL ¶

    FCntl_Command_GETFL :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETLEASE ¶

    FCntl_Command_GETLEASE :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETLK ¶

    FCntl_Command_GETLK :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETOWN ¶

    FCntl_Command_GETOWN :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Constants

    FCntl_Command_GETOWN_EX ¶

    FCntl_Command_GETOWN_EX :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETPIPE_SZ ¶

    FCntl_Command_GETPIPE_SZ :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GETSIG ¶

    FCntl_Command_GETSIG :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GET_FILE_RW_HINT ¶

    FCntl_Command_GET_FILE_RW_HINT :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GET_RW_HINT ¶

    FCntl_Command_GET_RW_HINT :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_GET_SEALS ¶

    FCntl_Command_GET_SEALS :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_NOTIFY ¶

    FCntl_Command_NOTIFY :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETFD ¶

    FCntl_Command_SETFD :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETFL ¶

    FCntl_Command_SETFL :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETLEASE ¶

    FCntl_Command_SETLEASE :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETLK ¶

    FCntl_Command_SETLK :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETLKW ¶

    FCntl_Command_SETLKW :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETOWN ¶

    FCntl_Command_SETOWN :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Constants

    FCntl_Command_SETOWN_EX ¶

    FCntl_Command_SETOWN_EX :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETPIPE_SZ ¶

    FCntl_Command_SETPIPE_SZ :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SETSIG ¶

    FCntl_Command_SETSIG :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SET_FILE_RW_HINT ¶

    FCntl_Command_SET_FILE_RW_HINT :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FCntl_Command_SET_RW_HINT ¶

    FCntl_Command_SET_RW_HINT :: enum int {
    	DUPFD            = 0, 
    	GETFD            = 1, 
    	SETFD            = 2, 
    	GETFL            = 3, 
    	SETFL            = 4, 
    	GETLK            = 5, 
    	SETLK            = 6, 
    	SETLKW           = 7, 
    	SETOWN           = 8, 
    	GETOWN           = 9, 
    	SETSIG           = 10, 
    	GETSIG           = 11, 
    	SETOWN_EX        = 15, 
    	GETOWN_EX        = 16, 
    	// OFD_GETLK         = 36,
    	// OFD_SETLK         = 37,
    	// OFD_SETLKW        = 38,
    	SETLEASE         = 1024, 
    	GETLEASE         = 1025, 
    	NOTIFY           = 1026, 
    	DUPFD_CLOEXEC    = 1030, 
    	SETPIPE_SZ       = 1031, 
    	GETPIPE_SZ       = 1032, 
    	ADD_SEALS        = 1033, 
    	GET_SEALS        = 1034, 
    	GET_RW_HINT      = 1035, 
    	SET_RW_HINT      = 1036, 
    	GET_FILE_RW_HINT = 1037, 
    	SET_FILE_RW_HINT = 1038, 
    }
    Related Procedures With Parameters
    Related Constants

    FD_Flags ¶

    FD_Flags :: bit_set[FD_Flags_Bits; i32]
     

    Flags for the file descriptors.

    FD_Flags_Bits ¶

    FD_Flags_Bits :: enum int {
    	SYMLINK_NOFOLLOW = 8, 
    	REMOVEDIR        = 9, 
    	EACCESS          = 9, 
    	SYMLINK_FOLLOW   = 10, 
    	NO_AUTOMOUNT     = 11, 
    	EMPTY_PATH       = 12, 
    	STATX_FORCE_SYNC = 13, 
    	STATX_DONT_SYNC  = 14, 
    	RECURSIVE        = 15, 
    }
     

    Bits for FD_Flags bitset

    FD_Lease ¶

    FD_Lease :: enum int {
    	RDLCK = 0, 
    	WRLCK = 1, 
    	UNLCK = 2, 
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    FD_Notifications ¶

    FD_Notifications :: bit_set[FD_Notifications_Bits; i32]
     

    Flags for fcntl_notify().

    FD_Notifications_Bits ¶

    FD_Notifications_Bits :: enum int {
    	ACCESS    = 0, 
    	MODIFY    = 1, 
    	CREATE    = 2, 
    	DELETE    = 3, 
    	RENAME    = 4, 
    	ATTRIB    = 5, 
    	MULTISHOT = 31, 
    }
     

    Bits for FD_Notifications

    FLock ¶

    FLock :: struct {
    	type:   FLock_Type,
    	whence: Seek_Whence,
    	start:  i64,
    	len:    i64,
    	pid:    Pid,
    }
     

    Lock record for fcntl(2).

    Related Procedures With Parameters

    FLock_Op ¶

    FLock_Op :: bit_set[FLock_Op_Bits; i32]
     

    File locking operations. Use one of EX, RW or UN to specify the operation, and add UN if you need a non-blocking operation.

    FLock_Op_Bits ¶

    FLock_Op_Bits :: enum int {
    	SH = 1, 
    	EX = 2, 
    	NB = 4, 
    	UN = 8, 
    }
     

    File locking operation bits

    FLock_Type ¶

    FLock_Type :: enum i16 {
    	RDLCK = 0, 
    	WRLCK = 1, 
    	UNLCK = 2, 
    }
     

    Type of a lock for fcntl(2)

    FS_Flags ¶

    FS_Flags :: bit_set[FS_Flags_Bits; u32]
     

    Mount flags for filesystem.

    FS_Flags_Bits ¶

    FS_Flags_Bits :: enum int {
    	RDONLY      = 0, 
    	NOSUID      = 1, 
    	NODEV       = 2, 
    	NOEXEC      = 3, 
    	SYNCHRONOUS = 4, 
    	VALID       = 5, 
    	MANDLOCK    = 6, 
    	NOATIME     = 10, 
    	NODIRATIME  = 11, 
    	RELATIME    = 12, 
    	NOSYMFOLLOW = 13, 
    }
     

    Bits for FS_Flags bitset

    FS_Magic ¶

    FS_Magic :: enum u32 {
    	ADFS_SUPER_MAGIC      = 44533, 
    	AFFS_SUPER_MAGIC      = 44543, 
    	AFS_SUPER_MAGIC       = 1397113167, 
    	ANON_INODE_FS_MAGIC   = 151263540, 
    	AUTOFS_SUPER_MAGIC    = 391, 
    	BDEVFS_MAGIC          = 1650746742, 
    	BEFS_SUPER_MAGIC      = 1111905073, 
    	BFS_MAGIC             = 464386766, 
    	BINFMTFS_MAGIC        = 1112100429, 
    	BPF_FS_MAGIC          = 3405662737, 
    	BTRFS_SUPER_MAGIC     = 2435016766, 
    	BTRFS_TEST_MAGIC      = 1936880249, 
    	CGROUP_SUPER_MAGIC    = 2613483, 
    	CGROUP2_SUPER_MAGIC   = 1667723888, 
    	CIFS_MAGIC_NUMBER     = 4283649346, 
    	CODA_SUPER_MAGIC      = 1937076805, 
    	COH_SUPER_MAGIC       = 19920823, 
    	CRAMFS_MAGIC          = 684539205, 
    	DEBUGFS_MAGIC         = 1684170528, 
    	DEVFS_SUPER_MAGIC     = 4979, 
    	DEVPTS_SUPER_MAGIC    = 7377, 
    	ECRYPTFS_SUPER_MAGIC  = 61791, 
    	EFIVARFS_MAGIC        = 3730735588, 
    	EFS_SUPER_MAGIC       = 4278867, 
    	EXT_SUPER_MAGIC       = 4989, 
    	EXT2_OLD_SUPER_MAGIC  = 61265, 
    	EXT2_SUPER_MAGIC      = 61267, 
    	EXT3_SUPER_MAGIC      = 61267, 
    	EXT4_SUPER_MAGIC      = 61267, 
    	F2FS_SUPER_MAGIC      = 4076150800, 
    	FUSE_SUPER_MAGIC      = 1702057286, 
    	FUTEXFS_SUPER_MAGIC   = 195894762, 
    	HFS_SUPER_MAGIC       = 16964, 
    	HOSTFS_SUPER_MAGIC    = 12648430, 
    	HPFS_SUPER_MAGIC      = 4187351113, 
    	HUGETLBFS_MAGIC       = 2508478710, 
    	ISOFS_SUPER_MAGIC     = 38496, 
    	JFFS2_SUPER_MAGIC     = 29366, 
    	JFS_SUPER_MAGIC       = 827541066, 
    	MINIX_SUPER_MAGIC     = 4991, 
    	MINIX_SUPER_MAGIC2    = 5007, 
    	MINIX2_SUPER_MAGIC    = 9320, 
    	MINIX2_SUPER_MAGIC2   = 9336, 
    	MINIX3_SUPER_MAGIC    = 19802, 
    	MQUEUE_MAGIC          = 427819522, 
    	MSDOS_SUPER_MAGIC     = 19780, 
    	MTD_INODE_FS_MAGIC    = 288389204, 
    	NCP_SUPER_MAGIC       = 22092, 
    	NFS_SUPER_MAGIC       = 26985, 
    	NILFS_SUPER_MAGIC     = 13364, 
    	NSFS_MAGIC            = 1853056627, 
    	NTFS_SB_MAGIC         = 1397118030, 
    	OCFS2_SUPER_MAGIC     = 1952539503, 
    	OPENPROM_SUPER_MAGIC  = 40865, 
    	OVERLAYFS_SUPER_MAGIC = 2035054128, 
    	PIPEFS_MAGIC          = 1346981957, 
    	PROC_SUPER_MAGIC      = 40864, 
    	PSTOREFS_MAGIC        = 1634035564, 
    	QNX4_SUPER_MAGIC      = 47, 
    	QNX6_SUPER_MAGIC      = 1746473250, 
    	RAMFS_MAGIC           = 2240043254, 
    	REISERFS_SUPER_MAGIC  = 1382369651, 
    	ROMFS_MAGIC           = 29301, 
    	SECURITYFS_MAGIC      = 1935894131, 
    	SELINUX_MAGIC         = 4185718668, 
    	SMACK_MAGIC           = 1128357203, 
    	SMB_SUPER_MAGIC       = 20859, 
    	SMB2_MAGIC_NUMBER     = 4266872130, 
    	SOCKFS_MAGIC          = 1397703499, 
    	SQUASHFS_MAGIC        = 1936814952, 
    	SYSFS_MAGIC           = 1650812274, 
    	SYSV2_SUPER_MAGIC     = 19920822, 
    	SYSV4_SUPER_MAGIC     = 19920821, 
    	TMPFS_MAGIC           = 16914836, 
    	TRACEFS_MAGIC         = 1953653091, 
    	UDF_SUPER_MAGIC       = 352400198, 
    	UFS_MAGIC             = 72020, 
    	USBDEVICE_SUPER_MAGIC = 40866, 
    	V9FS_MAGIC            = 16914839, 
    	VXFS_SUPER_MAGIC      = 2768370933, 
    	XENFS_SUPER_MAGIC     = 2881100148, 
    	XENIX_SUPER_MAGIC     = 19920820, 
    	XFS_SUPER_MAGIC       = 1481003842, 
    	_XIAFS_SUPER_MAGIC    = 19911021, 
    }
     

    Magic bits for filesystems returned by Stat_FS

    F_Owner ¶

    F_Owner :: struct {
    	type: F_Owner_Type,
    	pid:  Pid,
    }
     

    Represents owner that receives events on file updates.

    Related Procedures With Parameters

    F_Owner_Type ¶

    F_Owner_Type :: enum i32 {
    	OWNER_TID  = 0, 
    	OWNER_PID  = 1, 
    	OWNER_PGRP = 2, 
    }
     

    Kind of owner for FD_Owner

    Fd_Poll_Events ¶

    Fd_Poll_Events :: bit_set[Fd_Poll_Events_Bits; u16]
     

    Events for ppoll(2).

    Fd_Poll_Events_Bits ¶

    Fd_Poll_Events_Bits :: enum int {
    	IN     = 0, 
    	PRI    = 1, 
    	OUT    = 2, 
    	ERR    = 3, 
    	HUP    = 4, 
    	NVAL   = 5, 
    	RDNORM = 6, 
    	RDBAND = 7, 
    	WRNORM = 8, 
    	WRBAND = 9, 
    	MSG    = 10, 
    	REMOVE = 12, 
    	RDHUP  = 13, 
    }

    Futex ¶

    Futex :: u32
     

    Just an alias to make futex-values more visible

    Futex_Arg_Op ¶

    Futex_Arg_Op :: enum int {
    	SET      = 0, // uaddr2 =       oparg
    	ADD      = 1, // uaddr2 +=      oparg
    	OR       = 2, // uaddr2 |=      oparg
    	ANDN     = 3, // uaddr2 &=     ~oparg
    	XOR      = 4, // uaddr2 ^=      oparg
    	PO2_SET  = 0, // uaddr2 =    1<<oparg
    	PO2_ADD  = 1, // uaddr2 +=   1<<oparg
    	PO2_OR   = 2, // uaddr2 |=   1<<oparg
    	PO2_ANDN = 3, // uaddr2 &~=  1<<oparg
    	PO2_XOR  = 4, // uaddr2 ^=   1<<oparg
    }
     

    Kind of operation on futex, see FUTEX_WAKE_OP

    Related Procedures With Parameters

    Futex_Cmp_Op ¶

    Futex_Cmp_Op :: enum int {
    	EQ = 0, // if (oldval == cmparg) wake
    	NE = 1, // if (oldval != cmparg) wake
    	LT = 2, // if (oldval < cmparg) wake
    	LE = 3, // if (oldval <= cmparg) wake
    	GT = 4, // if (oldval > cmparg) wake
    	GE = 5, // if (oldval >= cmparg) wake
    }
     

    Kind of comparison operation on futex, see FUTEX_WAKE_OP

    Related Procedures With Parameters

    Futex_Cmp_Requeue_Type ¶

    Futex_Cmp_Requeue_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Futex_Cmp_requeue_Pi_Type ¶

    Futex_Cmp_requeue_Pi_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Fd_Type ¶

    Futex_Fd_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Flags ¶

    Futex_Flags :: bit_set[Futex_Flags_Bits; u32]
     

    Flags for the futex (they are kept separately)

    Futex_Flags_Bits ¶

    Futex_Flags_Bits :: enum int {
    	PRIVATE  = 7, 
    	REALTIME = 8, 
    }
     

    Bits for Futex_Flags

    Futex_Lock_Pi2_Type ¶

    Futex_Lock_Pi2_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Lock_Pi_Type ¶

    Futex_Lock_Pi_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Op ¶

    Futex_Op :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
     

    Second argument to futex(2) syscall

    Futex_Requeue_Type ¶

    Futex_Requeue_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Futex_Trylock_Pi_Type ¶

    Futex_Trylock_Pi_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Unlock_Pi_Type ¶

    Futex_Unlock_Pi_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Wait_Bitset_Type ¶

    Futex_Wait_Bitset_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Futex_Wait_Type ¶

    Futex_Wait_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Futex_Wait_requeue_Pi_Type ¶

    Futex_Wait_requeue_Pi_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Constants

    Futex_Wake_Bitset_Type ¶

    Futex_Wake_Bitset_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Futex_Wake_Op_Type ¶

    Futex_Wake_Op_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Futex_Wake_Type ¶

    Futex_Wake_Type :: enum u32 {
    	WAIT            = 0, 
    	WAKE            = 1, 
    	FD              = 2, 
    	REQUEUE         = 3, 
    	CMP_REQUEUE     = 4, 
    	WAKE_OP         = 5, 
    	LOCK_PI         = 6, 
    	UNLOCK_PI       = 7, 
    	TRYLOCK_PI      = 8, 
    	WAIT_BITSET     = 9, 
    	WAKE_BITSET     = 10, 
    	WAIT_REQUEUE_PI = 11, 
    	CMP_REQUEUE_PI  = 12, 
    	LOCK_PI2        = 13, 
    }
    Related Procedures With Parameters
    Related Constants

    Get_Random_Flags ¶

    Get_Random_Flags :: bit_set[Get_Random_Flags_Bits; i32]
     

    Flags for getrandom(2) syscall.

    Get_Random_Flags_Bits ¶

    Get_Random_Flags_Bits :: enum int {
    	RANDOM   = 0, 
    	NONBLOCK = 1, 
    	INSECURE = 2, 
    }
     

    Bits for Get_Random_Flags

    Gid ¶

    Gid :: distinct u32
     

    Type for 32-bit Group IDs.

    Related Procedures With Parameters
    Related Procedures With Returns

    Hardware_Breakpoint_Type ¶

    Hardware_Breakpoint_Type :: enum u32 {
    	EMPTY   = 0, 
    	R       = 1, 
    	W       = 2, 
    	X       = 4, 
    	RW      = 3, 
    	INVALID = 7, 
    }
     

    Chooses the breakpoint type

    IO_Vec ¶

    IO_Vec :: struct {
    	base: rawptr,
    	len:  uint,
    }
     

    Struct used for IO operations

    Related Procedures With Parameters

    IPC_Cmd ¶

    IPC_Cmd :: enum i16 {
    	// IPC common
    	IPC_RMID     = 0, 
    	IPC_SET      = 1, 
    	IPC_STAT     = 2, 
    	// Shared memory
    	SHM_LOCK     = 11, 
    	SHM_UNLOCK   = 12, 
    	SHM_STAT     = 13, 
    	SHM_INFO     = 14, 
    	SHM_STAT_ANY = 15, 
    	// Semaphore
    	GETPID       = 11, 
    	GETVAL       = 12, 
    	GETALL       = 13, 
    	GETNCNT      = 14, 
    	GETZCNT      = 15, 
    	SETVAL       = 16, 
    	SETALL       = 17, 
    	SEM_STAT     = 18, 
    	SEM_INFO     = 19, 
    	SEM_STAT_ANY = 20, 
    	// Message queue
    	MSG_STAT     = 11, 
    	MSG_INFO     = 12, 
    	MSG_STAT_ANY = 13, 
    }
     

    IPC memory commands

    Related Procedures With Parameters

    IPC_Flags ¶

    IPC_Flags :: bit_set[IPC_Flags_Bits; i16]
     

    Flags used by IPC objects

    IPC_Flags_Bits ¶

    IPC_Flags_Bits :: enum int {
    	IPC_CREAT     = 9, 
    	IPC_EXCL      = 10, 
    	IPC_NOWAIT    = 11, 
    	// Semaphore
    	SEM_UNDO      = 9, 
    	// Shared memory
    	SHM_HUGETLB   = 11, 
    	SHM_NORESERVE = 12, 
    	SHM_RDONLY    = 12, 
    	SHM_RND       = 13, 
    	SHM_REMAP     = 14, 
    	SHM_EXEC      = 15, 
    	// Message queue
    	MSG_NOERROR   = 12, 
    	MSG_EXCEPT    = 13, 
    	MSG_COPY      = 14, 
    }
     

    Shared memory flags bits

    IPC_Mode ¶

    IPC_Mode :: bit_set[IPC_Mode_Bits; u32]
     

    Access mode for shared memory

    IPC_Mode_Bits ¶

    IPC_Mode_Bits :: enum int {
    	WROTH  = 1, 
    	RDOTH  = 2, 
    	WRGRP  = 4, 
    	RDGRP  = 5, 
    	WRUSR  = 7, 
    	RDUSR  = 8, 
    	DEST   = 9, 
    	LOCKED = 10, 
    }
     

    Bits for access modes for shared memory

    IPC_Perm ¶

    IPC_Perm :: struct {
    	key:  Key,
    	uid:  u32,
    	gid:  u32,
    	cuid: u32,
    	cgid: u32,
    	mode: bit_set[IPC_Mode_Bits; u32],
    	seq:  u16,
    	_:    [18]u8,
    }
     

    Permissions for IPC objects

    ITimer_Flags ¶

    ITimer_Flags :: bit_set[ITimer_Flags_Bits; u32]
     

    Flags for POSIX interval timers.

    ITimer_Flags_Bits ¶

    ITimer_Flags_Bits :: enum int {
    	ABSTIME = 1, 
    }
     

    Bits for POSIX interval timer flags.

    ITimer_Spec ¶

    ITimer_Spec :: struct {
    	interval: Time_Spec,
    	value:    Time_Spec,
    }
    Related Procedures With Parameters

    ITimer_Val ¶

    ITimer_Val :: struct {
    	interval: Time_Val,
    	value:    Time_Val,
    }
     

    Interval timer value

    Related Procedures With Parameters

    ITimer_Which ¶

    ITimer_Which :: enum int {
    	REAL    = 0, 
    	VIRTUAL = 1, 
    	PROF    = 2, 
    }
     

    Interval timer types

    Related Procedures With Parameters

    Id ¶

    Id :: distinct uint
     

    Type for any of: pid, pidfd, pgid.

    Related Procedures With Parameters

    Id_Type ¶

    Id_Type :: enum uint {
    	ALL   = 0, 
    	PID   = 1, 
    	PGID  = 2, 
    	PIDFD = 3, 
    }
     

    Represent the type of Id

    Related Procedures With Parameters

    Inode ¶

    Inode :: distinct u64
     

    Type for 64-bit inode number for files. Used pretty much only in struct Stat64 for 32-bit platforms.

    Key ¶

    Key :: distinct i32
     

    Shared memory identifiers used by shmget(2) and other calls.

    Related Procedures With Parameters
    Related Constants

    MAdvice ¶

    MAdvice :: enum int {
    	NORMAL          = 0, 
    	RANDOM          = 1, 
    	SEQUENTIAL      = 2, 
    	WILLNEED        = 3, 
    	DONTNEED        = 4, 
    	FREE            = 8, 
    	REMOVE          = 9, 
    	DONTFORK        = 10, 
    	DOFORK          = 11, 
    	MERGEABLE       = 12, 
    	UNMERGEABLE     = 13, 
    	HUGEPAGE        = 14, 
    	NOHUGEPAGE      = 15, 
    	DONTDUMP        = 16, 
    	DODUMP          = 17, 
    	WIPEONFORK      = 18, 
    	KEEPONFORK      = 19, 
    	COLD            = 20, 
    	PAGEOUT         = 21, 
    	POPULATE_READ   = 22, 
    	POPULATE_WRITE  = 23, 
    	DONTNEED_LOCKED = 24, 
    	COLLAPSE        = 25, 
    	HWPOISON        = 100, 
    	SOFT_OFFLINE    = 101, 
    }
     

    Argument for madvice(2)

    Related Procedures With Parameters

    MLock_Flags ¶

    MLock_Flags :: bit_set[MLock_Flags_Bits; u32]
     

    Flags for mlock(2).

    MLock_Flags_Bits ¶

    MLock_Flags_Bits :: enum int {
    	ONFAULT = 0, 
    }
     

    Bits for MLock_Flags

    MMsg_Hdr ¶

    MMsg_Hdr :: struct {
    	hdr: Msg_Hdr,
    	len: u32,
    }
     

    Multiple message header for sendmmsg/recvmmsg

    MRemap_Flags ¶

    MRemap_Flags :: bit_set[MRemap_Flags_Bits; i32]
     

    Flags for mremap(2).

    MRemap_Flags_Bits ¶

    MRemap_Flags_Bits :: enum int {
    	MAYMOVE   = 0, 
    	FIXED     = 1, 
    	DONTUNMAP = 2, 
    }
     

    Bits for MRemap_Flags

    MSync_Flags ¶

    MSync_Flags :: bit_set[MSync_Flags_Bits; i32]
     

    Flags for msync(2).

    MSync_Flags_Bits ¶

    MSync_Flags_Bits :: enum int {
    	ASYNC      = 0, 
    	INVALIDATE = 1, 
    	SYNC       = 2, 
    }
     

    Bits for MSync_Flags

    Map_Flags ¶

    Map_Flags :: bit_set[Map_Flags_Bits; i32]
     

    Flags for mmap.

    Map_Flags_Bits ¶

    Map_Flags_Bits :: enum int {
    	SHARED          = 0, 
    	PRIVATE         = 1, 
    	SHARED_VALIDATE = 2, 
    	FIXED           = 4, 
    	ANONYMOUS       = 5, 
    	// platform-dependent section start
    	X86_32BIT       = 6, 
    	X86_ABOVE4G     = 7, 
    	// platform-dependent section end
    	GROWSDOWN       = 8, 
    	DENYWRITE       = 11, 
    	EXECUTABLE      = 12, 
    	LOCKED          = 13, 
    	NORESERVE       = 14, 
    	POPULATE        = 15, 
    	NONBLOCK        = 16, 
    	STACK           = 17, 
    	HUGETLB         = 18, 
    	SYNC            = 19, 
    	FIXED_NOREPLACE = 20, 
    	UNINITIALIZED   = 26, 
    }
     

    Bits for Map_Flags

    Mem_Protection ¶

    Mem_Protection :: bit_set[Mem_Protection_Bits; i32]
     

    Specifies protection for memory pages.

    Mem_Protection_Bits ¶

    Mem_Protection_Bits :: enum int {
    	READ      = 0, 
    	WRITE     = 1, 
    	EXEC      = 2, 
    	SEM       = 3, 
    	// platform-specific section start
    	ARM64_BTI = 4, 
    	ARM64_MTE = 5, 
    	// platform-specific section end
    	GROWSDOWN = 24, 
    	GROWSUP   = 25, 
    }
     

    Bits for Mem_Protection bitfield

    Mode ¶

    Mode :: bit_set[Mode_Bits; u32]
     
    Represents file's permission and status bits
    

    Example:

    When you're passing a value of this type the recommended usage is:
    
    ```
      linux.Mode{.S_IXOTH, .S_IROTH} | linux.S_IRWXU | linux.S_IRWXG
    ```
    
    This would generate a mode that has full permissions for the
    file's owner and group, and only "read" and "execute" bits
    for others.
    
    Related Constants

    Mode_Bits ¶

    Mode_Bits :: enum int {
    	IXOTH = 0,  // 0o0000001
    	IWOTH = 1,  // 0o0000002
    	IROTH = 2,  // 0o0000004
    	IXGRP = 3,  // 0o0000010
    	IWGRP = 4,  // 0o0000020
    	IRGRP = 5,  // 0o0000040
    	IXUSR = 6,  // 0o0000100
    	IWUSR = 7,  // 0o0000200
    	IRUSR = 8,  // 0o0000400
    	ISVTX = 9,  // 0o0001000
    	ISGID = 10, // 0o0002000
    	ISUID = 11, // 0o0004000
    	IFIFO = 12, // 0o0010000
    	IFCHR = 13, // 0o0020000
    	IFDIR = 14, // 0o0040000
    	IFREG = 15, // 0o0100000
    }
     

    The bits for the Mode bitset.

    Msg_Buf ¶

    Msg_Buf :: struct {
    	type: int,
    	text: [0]u8,
    }
     

    Template for the struct used for sending and receiving messages

    Msg_Hdr ¶

    Msg_Hdr :: struct {
    	name:    rawptr,
    	namelen: i32,
    	iov:     []IO_Vec,
    	// ptr followed by length, abi matches
    	control: []u8,
    	flags:   bit_set[Socket_Msg_Bits; i32],
    }
     

    Message header for sendmsg/recvmsg

    Related Procedures With Parameters

    Msqid_DS ¶

    Msqid_DS :: struct {
    	perm:   IPC_Perm,
    	stime:  uint,
    	rtime:  uint,
    	ctime:  uint,
    	cbytes: uint,
    	qnum:   uint,
    	qbytes: uint,
    	lspid:  Pid,
    	lrpid:  Pid,
    	_:      [2]uint,
    }
     

    SystemV message queue data.

    Related Procedures With Parameters

    Open_Flags ¶

    Open_Flags :: bit_set[Open_Flags_Bits; u32]
     

    Flags for open(2).

    Open_Flags_Bits ¶

    Open_Flags_Bits :: enum int {
    	WRONLY    = 0, 
    	RDWR      = 1, 
    	CREAT     = 6, 
    	EXCL      = 7, 
    	NOCTTY    = 8, 
    	TRUNC     = 9, 
    	APPEND    = 10, 
    	NONBLOCK  = 11, 
    	DSYNC     = 12, 
    	ASYNC     = 13, 
    	DIRECT    = 14, 
    	LARGEFILE = 15, 
    	DIRECTORY = 16, 
    	NOFOLLOW  = 17, 
    	NOATIME   = 18, 
    	CLOEXEC   = 19, 
    	PATH      = 21, 
    }

    PKey_Access_Bits ¶

    PKey_Access_Bits :: enum int {
    	DISABLE_ACCESS = 0, 
    	DISABLE_WRITE  = 2, 
    }
     

    Bits for PKey_Access_Rights

    PKey_Access_Rights ¶

    PKey_Access_Rights :: bit_set[PKey_Access_Bits; u32]
     

    Access rights for pkey_alloc(2).

    PTrace_Arch_Prctl_Type ¶

    PTrace_Arch_Prctl_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Attach_Type ¶

    PTrace_Attach_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Cont_Type ¶

    PTrace_Cont_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Detach_Type ¶

    PTrace_Detach_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Event_Code ¶

    PTrace_Event_Code :: enum int {
    	EVENT_FORK       = 1, 
    	EVENT_VFORK      = 2, 
    	EVENT_CLONE      = 3, 
    	EVENT_EXEC       = 4, 
    	EVENT_VFORK_DONE = 5, 
    	EVENT_EXIT       = 6, 
    	EVENT_SECCOMP    = 7, 
    	EVENT_STOP       = 128, 
    }
     

    ptrace event codes.

    PTrace_Get_RSeq_Configuration_Type ¶

    PTrace_Get_RSeq_Configuration_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Get_Syscall_Info_Op ¶

    PTrace_Get_Syscall_Info_Op :: enum u8 {
    	NONE    = 0, 
    	ENTRY   = 1, 
    	EXIT    = 2, 
    	SECCOMP = 3, 
    }
     

    ptrace's get syscall info operation.

    PTrace_Get_Syscall_Info_Type ¶

    PTrace_Get_Syscall_Info_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Get_Thread_Area_Type ¶

    PTrace_Get_Thread_Area_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Geteventmsg_Type ¶

    PTrace_Geteventmsg_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Getfpregs_Type ¶

    PTrace_Getfpregs_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Getfpxregs_Type ¶

    PTrace_Getfpxregs_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Getregs_Type ¶

    PTrace_Getregs_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Getregset_Type ¶

    PTrace_Getregset_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Getsiginfo_Type ¶

    PTrace_Getsiginfo_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Getsigmask_Type ¶

    PTrace_Getsigmask_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Interrupt_Type ¶

    PTrace_Interrupt_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Kill_Type ¶

    PTrace_Kill_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Listen_Type ¶

    PTrace_Listen_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Note_Type ¶

    PTrace_Note_Type :: enum int {
    	NT_PRSTATUS             = 1, 
    	NT_PRFPREG              = 2, 
    	NT_PRPSINFO             = 3, 
    	NT_TASKSTRUCT           = 4, 
    	NT_AUXV                 = 6, 
    	NT_SIGINFO              = 1397311305, 
    	NT_FILE                 = 1179208773, 
    	NT_PRXFPREG             = 1189489535, 
    	NT_386_TLS              = 512, 
    	NT_386_IOPERM           = 513, 
    	NT_X86_XSTATE           = 514, 
    	NT_X86_SHSTK            = 516, 
    	NT_ARM_VFP              = 1024, 
    	NT_ARM_TLS              = 1025, 
    	NT_ARM_HW_BREAK         = 1026, 
    	NT_ARM_HW_WATCH         = 1027, 
    	NT_ARM_SYSTEM_CALL      = 1028, 
    	NT_ARM_SVE              = 1029, 
    	NT_ARM_PAC_MASK         = 1030, 
    	NT_ARM_PACA_KEYS        = 1031, 
    	NT_ARM_PACG_KEYS        = 1032, 
    	NT_ARM_TAGGED_ADDR_CTRL = 1033, 
    	NT_ARM_PAC_ENABLED_KEYS = 1034, 
    	NT_ARM_SSVE             = 1035, 
    	NT_ARM_ZA               = 1036, 
    	NT_ARM_ZT               = 1037, 
    }
     

    Note types for PTRACE_GETREGSET. Mirrors constants in elf definition, files though this enum only contains the constants defined for architectures Odin can compile to.

    Related Procedures With Parameters

    PTrace_Options ¶

    PTrace_Options :: bit_set[PTrace_Options_Bits; u32]
     

    ptrace options.

    PTrace_Options_Bits ¶

    PTrace_Options_Bits :: enum int {
    	TRACESYSGOOD    = 0, 
    	TRACEFORK       = 1, 
    	TRACEVFORK      = 2, 
    	TRACECLONE      = 3, 
    	TRACEEXEC       = 4, 
    	TRACEVFORKDONE  = 5, 
    	TRACEEXIT       = 6, 
    	TRACESECCOMP    = 7, 
    	EXITKILL        = 20, 
    	SUSPEND_SECCOMP = 21, 
    }
     

    ptrace options

    PTrace_Peek_Sig_Info_Args ¶

    PTrace_Peek_Sig_Info_Args :: struct {
    	off:   u64,
    	flags: bit_set[PTrace_Peek_Sig_Info_Flags_Bits; u32],
    	nr:    i32,
    }
     

    ptrace's PEEKSIGINFO argument.

    PTrace_Peek_Sig_Info_Flags ¶

    PTrace_Peek_Sig_Info_Flags :: bit_set[PTrace_Peek_Sig_Info_Flags_Bits; u32]
     

    ptrace's PEEKSIGINFO flags.

    PTrace_Peek_Sig_Info_Flags_Bits ¶

    PTrace_Peek_Sig_Info_Flags_Bits :: enum int {
    	SHARED = 0, 
    }
     

    ptrace's PEEKSIGINFO flags bits

    PTrace_Peek_Type ¶

    PTrace_Peek_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Peeksiginfo_Type ¶

    PTrace_Peeksiginfo_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Poke_Type ¶

    PTrace_Poke_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_RSeq_Configuration ¶

    PTrace_RSeq_Configuration :: struct {
    	rseq_abi_pointer: u64,
    	rseq_abi_size:    u32,
    	signature:        u32,
    	flags:            u32,
    	_:                u32,
    }
     

    ptrace's results of GET_RSEQ_CONFIGURATION.

    PTrace_Request ¶

    PTrace_Request :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
     

    ptrace requests

    PTrace_Seccomp_Get_Filter_Type ¶

    PTrace_Seccomp_Get_Filter_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Seccomp_Get_Metadata_Type ¶

    PTrace_Seccomp_Get_Metadata_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Seccomp_Metadata ¶

    PTrace_Seccomp_Metadata :: struct {
    	filter_off: u64,
    	flags:      u64,
    }
     

    ptrace's SECCOMP metadata.

    PTrace_Seize_Type ¶

    PTrace_Seize_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Set_Thread_Area_Type ¶

    PTrace_Set_Thread_Area_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Setfpregs_Type ¶

    PTrace_Setfpregs_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Setfpxregs_Type ¶

    PTrace_Setfpxregs_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Setoptions_Type ¶

    PTrace_Setoptions_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Setregs_Type ¶

    PTrace_Setregs_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Setregset_Type ¶

    PTrace_Setregset_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Setsiginfo_Type ¶

    PTrace_Setsiginfo_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Setsigmask_Type ¶

    PTrace_Setsigmask_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Singleblock_Type ¶

    PTrace_Singleblock_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Constants

    PTrace_Singlestep_Type ¶

    PTrace_Singlestep_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Syscall_Info ¶

    PTrace_Syscall_Info :: struct {
    	op:                  PTrace_Get_Syscall_Info_Op,
    	arch:                u32,
    	// TODO: AUDIT_ARCH*
    	instruction_pointer: u64,
    	stack_pointer:       u64,
    	using _:             struct #raw_union {
    		entry:   struct {
    			nr:   u64,
    			args: [6]u64,
    		},
    		exit:    struct {
    			rval:     i64,
    			is_error: b8,
    		},
    		seccomp: struct {
    			nr:       u64,
    			args:     [6]u64,
    			ret_data: u32,
    		},
    	},
    }
     

    ptrace's results of GET_SYSCALL_INFO.

    PTrace_Syscall_Type ¶

    PTrace_Syscall_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Sysemu_Singlestep_Type ¶

    PTrace_Sysemu_Singlestep_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Sysemu_Type ¶

    PTrace_Sysemu_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    PTrace_Traceme_Type ¶

    PTrace_Traceme_Type :: enum int {
    	TRACEME                = 0, 
    	PEEKTEXT               = 1, 
    	PEEKDATA               = 2, 
    	PEEKUSER               = 3, 
    	POKETEXT               = 4, 
    	POKEDATA               = 5, 
    	POKEUSER               = 6, 
    	CONT                   = 7, 
    	KILL                   = 8, 
    	SINGLESTEP             = 9, 
    	GETREGS                = 12, 
    	SETREGS                = 13, 
    	GETFPREGS              = 14, 
    	SETFPREGS              = 15, 
    	ATTACH                 = 16, 
    	DETACH                 = 17, 
    	GETFPXREGS             = 18, 
    	SETFPXREGS             = 19, 
    	SYSCALL                = 24, 
    	GET_THREAD_AREA        = 25, 
    	SET_THREAD_AREA        = 26, 
    	ARCH_PRCTL             = 30, 
    	SYSEMU                 = 31, 
    	SYSEMU_SINGLESTEP      = 32, 
    	SINGLEBLOCK            = 33, 
    	SETOPTIONS             = 16896, 
    	GETEVENTMSG            = 16897, 
    	GETSIGINFO             = 16898, 
    	SETSIGINFO             = 16899, 
    	GETREGSET              = 16900, 
    	SETREGSET              = 16901, 
    	SEIZE                  = 16902, 
    	INTERRUPT              = 16903, 
    	LISTEN                 = 16904, 
    	PEEKSIGINFO            = 16905, 
    	GETSIGMASK             = 16906, 
    	SETSIGMASK             = 16907, 
    	SECCOMP_GET_FILTER     = 16908, 
    	SECCOMP_GET_METADATA   = 16909, 
    	GET_SYSCALL_INFO       = 16910, 
    	GET_RSEQ_CONFIGURATION = 16911, 
    }
    Related Procedures With Parameters
    Related Constants

    Perf_Cap_Flags ¶

    Perf_Cap_Flags :: distinct bit_set[Perf_Cap_Flags_Bits; u64]

    Perf_Cap_Flags_Bits ¶

    Perf_Cap_Flags_Bits :: enum u64 {
    	Bit0               = 0, 
    	Bit0_Is_Deprecated = 1, 
    	User_Rdpmc         = 2, 
    	User_Time          = 3, 
    	User_Time_Zero     = 4, 
    	User_Time_Short    = 5, 
    }

    Perf_Event_Attr ¶

    Perf_Event_Attr :: struct #packed {
    	type:               Perf_Event_Type,
    	size:               u32,
    	config:             struct #raw_union {
    		hw:    Perf_Hardware_Id,
    		sw:    Perf_Software_Id,
    		cache: u64,
    		other: u64,
    	},
    	sample:             struct #raw_union {
    		period:    u64,
    		frequency: u64,
    	},
    	sample_type:        bit_set[Perf_Event_Sample_Type_Bits; u64],
    	read_format:        Perf_Read_Format,
    	flags:              Perf_Event_Flags,
    	wakeup:             struct #raw_union {
    		events:    u32,
    		watermark: u32,
    	},
    	breakpoint_type:    Hardware_Breakpoint_Type,
    	using _:            struct #raw_union {
    		breakpoint_addr: u64,
    		kprobe_func:     u64,
    		uprobe_path:     u64,
    		config1:         u64,
    	},
    	using _:            struct #raw_union {
    		breakpoint_len: u64,
    		kprobe_addr:    u64,
    		uprobe_offset:  u64,
    		config2:        u64,
    	},
    	branch_sample_type: bit_set[Branch_Sample_Type_Bits; u64],
    	sample_regs_user:   u64,
    	sample_stack_user:  u32,
    	clock_id:           i32,
    	// TODO(flysand): clock_id
    	sample_regs_intr:   u64,
    	aux_watermark:      u32,
    	sample_max_stack:   u16,
    	_:                  u16,
    }
     

    The struct for perf_event_open.

    Related Procedures With Parameters

    Perf_Event_Flags ¶

    Perf_Event_Flags :: distinct bit_set[Perf_Event_Flags_Bits; u64]

    Perf_Event_Flags_Bits ¶

    Perf_Event_Flags_Bits :: enum u64 {
    	Disabled                 = 0, 
    	Inherit                  = 1, 
    	Pinned                   = 2, 
    	Exclusive                = 3, 
    	Exclude_User             = 4, 
    	Exclude_Kernel           = 5, 
    	Exclude_HV               = 6, 
    	Exclude_Idle             = 7, 
    	Mmap                     = 8, 
    	Comm                     = 9, 
    	Freq                     = 10, 
    	Inherit_Stat             = 11, 
    	Enable_On_Exec           = 12, 
    	Task                     = 13, 
    	Watermark                = 14, 
    	Precise_IP_0             = 15, 
    	Precise_IP_1             = 16, 
    	Mmap_Data                = 17, 
    	Sample_Id_All            = 18, 
    	Exclude_Host             = 19, 
    	Exclude_Guest            = 20, 
    	Exclude_Callchain_Kernel = 21, 
    	Exclude_Callchain_User   = 22, 
    	Mmap2                    = 23, 
    	Comm_Exec                = 24, 
    	Use_Clockid              = 25, 
    	Context_Switch           = 26, 
    	Write_Backward           = 27, 
    	Namespaces               = 28, 
    	KSymbol                  = 29, 
    	BPF_Event                = 30, 
    	Aux_Output               = 31, 
    	CGroup                   = 32, 
    	Text_Poke                = 33, 
    	Build_Id                 = 34, 
    	Inherit_Thread           = 35, 
    	Remove_On_Exec           = 36, 
    	Sigtrap                  = 37, 
    }

    Perf_Event_Mmap_Page ¶

    Perf_Event_Mmap_Page :: struct #packed {
    	version:        u32,
    	compat_version: u32,
    	lock:           u32,
    	index:          u32,
    	offset:         i64,
    	time_enabled:   u64,
    	time_running:   u64,
    	cap:            struct #raw_union {
    		capabilities: u64,
    		flags:        Perf_Cap_Flags,
    	},
    	pmc_width:      u16,
    	time_shift:     u16,
    	time_mult:      u32,
    	time_offset:    u64,
    	time_zero:      u64,
    	size:           u32,
    	reserved1:      u32,
    	time_cycles:    u64,
    	time_mask:      u64,
    	reserved2:      [928]u8,
    	data_head:      u64,
    	data_tail:      u64,
    	data_offset:    u64,
    	data_size:      u64,
    	aux_head:       u64,
    	aux_tail:       u64,
    	aux_offset:     u64,
    	aux_size:       u64,
    }
     

    The ring buffer structure when mmaping Perf_Event_Attr.

    Perf_Event_Sample_Type_Bits ¶

    Perf_Event_Sample_Type_Bits :: enum int {
    	IP             = 0, 
    	TID            = 1, 
    	TIME           = 2, 
    	ADDR           = 3, 
    	READ           = 4, 
    	CALLCHAIN      = 5, 
    	ID             = 6, 
    	CPU            = 7, 
    	PERIOD         = 8, 
    	STREAM_ID      = 9, 
    	RAW            = 10, 
    	BRANCH_STACK   = 11, 
    	REGS_USER      = 12, 
    	STACK_USER     = 13, 
    	WEIGHT         = 14, 
    	DATA_SRC       = 15, 
    	IDENTIFIER     = 16, 
    	TRANSACTION    = 17, 
    	REGS_INTR      = 18, 
    	PHYS_ADDR      = 19, 
    	AUX            = 20, 
    	CGROUP         = 21, 
    	DATA_PAGE_SIZE = 22, 
    	CODE_PAGE_SIZE = 23, 
    	WEIGHT_STRUCT  = 24, 
    }
     

    Specifies which values to include in the sample

    Perf_Event_Type ¶

    Perf_Event_Type :: enum u32 {
    	HARDWARE   = 0, 
    	SOFTWARE   = 1, 
    	TRACEPOINT = 2, 
    	HW_CACHE   = 3, 
    	RAW        = 4, 
    	BREAKPOINT = 5, 
    }
     

    Union tag for Perf_Event_Attr struct

    Perf_Flags ¶

    Perf_Flags :: bit_set[Perf_Flags_Bits; uint]
     

    Flags for perf_event_open(2) syscall.

    Perf_Flags_Bits ¶

    Perf_Flags_Bits :: enum int {
    	FD_NO_GROUP = 0, 
    	FD_OUTPUT   = 1, 
    	PID_CGROUP  = 2, 
    	FD_CLOEXEC  = 3, 
    }
     

    Bits for Perf_Flags

    Perf_Hardware_Cache_Id ¶

    Perf_Hardware_Cache_Id :: enum u64 {
    	L1D  = 0, 
    	L1I  = 1, 
    	LL   = 2, 
    	DTLB = 3, 
    	ITLB = 4, 
    	BPU  = 5, 
    	NODE = 6, 
    }
     

    Specifies the cache for the particular cache event that you want to get info about

    Related Procedures With Parameters

    Perf_Hardware_Cache_Op_Id ¶

    Perf_Hardware_Cache_Op_Id :: enum u64 {
    	READ     = 0, 
    	WRITE    = 1, 
    	PREFETCH = 2, 
    }
     

    Specifies the cache op that you want to get info about

    Related Procedures With Parameters

    Perf_Hardware_Cache_Result_Id ¶

    Perf_Hardware_Cache_Result_Id :: enum u64 {
    	ACCESS = 0, 
    	MISS   = 1, 
    }
     

    Specifies the cache operation result that you want to get info about

    Related Procedures With Parameters

    Perf_Hardware_Id ¶

    Perf_Hardware_Id :: enum u64 {
    	CPU_CYCLES              = 0, 
    	INSTRUCTIONS            = 1, 
    	CACHE_REFERENCES        = 2, 
    	CACHE_MISSES            = 3, 
    	BRANCH_INSTRUCTIONS     = 4, 
    	BRANCH_MISSES           = 5, 
    	BUS_CYCLES              = 6, 
    	STALLED_CYCLES_FRONTEND = 7, 
    	STALLED_CYCLES_BACKEND  = 8, 
    	REF_CPU_CYCLES          = 9, 
    }
     

    Specifies the type of the hardware event that you want to get info about

    Perf_Read_Format ¶

    Perf_Read_Format :: distinct bit_set[Perf_Read_Format_Bits; u64]

    Perf_Read_Format_Bits ¶

    Perf_Read_Format_Bits :: enum int {
    	TOTAL_TIME_ENABLED = 0, 
    	TOTAL_TIME_RUNNING = 1, 
    	ID                 = 2, 
    	GROUP              = 3, 
    	LOST               = 4, 
    }
     

    / Describes field sets to include in mmaped page

    Perf_Software_Id ¶

    Perf_Software_Id :: enum u64 {
    	CPU_CLOCK        = 0, 
    	TASK_CLOCK       = 1, 
    	PAGE_FAULTS      = 2, 
    	CONTEXT_SWITCHES = 3, 
    	CPU_MIGRATIONS   = 4, 
    	PAGE_FAULTS_MIN  = 5, 
    	PAGE_FAULTS_MAJ  = 6, 
    	ALIGNMENT_FAULTS = 7, 
    	EMULATION_FAULTS = 8, 
    	DUMMY            = 9, 
    	BPF_OUTPUT       = 10, 
    	CGROUP_SWITCHES  = 11, 
    }
     

    Specifies the particular software event that you want to get info about

    Pid_FD ¶

    Pid_FD :: distinct i32
     

    Type for PID file descriptors.

    Related Procedures With Parameters
    Related Procedures With Returns

    Pid_FD_Flags ¶

    Pid_FD_Flags :: bit_set[Pid_FD_Flags_Bits; i32]
     

    Flags for pidfd_open(2).

    Pid_FD_Flags_Bits ¶

    Pid_FD_Flags_Bits :: enum int {
    	NONBLOCK = 11, 
    }
     

    Bits for flags for pidfd

    Poll_Fd ¶

    Poll_Fd :: struct {
    	fd:      Fd,
    	events:  bit_set[Fd_Poll_Events_Bits; u16],
    	revents: bit_set[Fd_Poll_Events_Bits; u16],
    }
     

    Struct for ppoll(2).

    Priority_Which ¶

    Priority_Which :: enum i32 {
    	PROCESS = 0, 
    	PGRP    = 1, 
    	USER    = 2, 
    }
     

    Priority for process, process group, user

    Related Procedures With Parameters

    Protocol ¶

    Protocol :: enum int {
    	HOPOPT          = 0, 
    	ICMP            = 1, 
    	IGMP            = 2, 
    	GGP             = 3, 
    	IPv4            = 4, 
    	ST              = 5, 
    	TCP             = 6, 
    	CBT             = 7, 
    	EGP             = 8, 
    	IGP             = 9, 
    	BBN_RCC_MON     = 10, 
    	NVP_II          = 11, 
    	PUP             = 12, 
    	EMCON           = 14, 
    	XNET            = 15, 
    	CHAOS           = 16, 
    	UDP             = 17, 
    	MUX             = 18, 
    	DCN_MEAS        = 19, 
    	HMP             = 20, 
    	PRM             = 21, 
    	XNS_IDP         = 22, 
    	TRUNK_1         = 23, 
    	TRUNK_2         = 24, 
    	LEAF_1          = 25, 
    	LEAF_2          = 26, 
    	RDP             = 27, 
    	IRTP            = 28, 
    	ISO_TP4         = 29, 
    	NETBLT          = 30, 
    	MFE_NSP         = 31, 
    	MERIT_INP       = 32, 
    	DCCP            = 33, 
    	THREE_PC        = 34, 
    	IDPR            = 35, 
    	XTP             = 36, 
    	DDP             = 37, 
    	IDPR_CMTP       = 38, 
    	TP_PlusPlus     = 39, 
    	IL              = 40, 
    	IPv6            = 41, 
    	SDRP            = 42, 
    	IPv6_Route      = 43, 
    	IPv6_Frag       = 44, 
    	IDRP            = 45, 
    	RSVP            = 46, 
    	GRE             = 47, 
    	DSR             = 48, 
    	BNA             = 49, 
    	ESP             = 50, 
    	AH              = 51, 
    	I_NLSP          = 52, 
    	NARP            = 54, 
    	MOBILE          = 55, 
    	TLSP            = 56, 
    	SKIP            = 57, 
    	IPv6_ICMP       = 58, 
    	IPv6_NoNxt      = 59, 
    	IPv6_Opts       = 60, 
    	CFTP            = 62, 
    	SAT_EXPAK       = 64, 
    	KRYPTOLAN       = 65, 
    	RVD             = 66, 
    	IPPC            = 67, 
    	SAT_MON         = 69, 
    	VISA            = 70, 
    	IPCV            = 71, 
    	CPNX            = 72, 
    	CPHB            = 73, 
    	WSN             = 74, 
    	PVP             = 75, 
    	BR_SAT_MON      = 76, 
    	SUN_ND          = 77, 
    	WB_MON          = 78, 
    	WB_EXPAK        = 79, 
    	ISO_IP          = 80, 
    	VMTP            = 81, 
    	SECURE_VMTP     = 82, 
    	VINES           = 83, 
    	IPTM            = 84, 
    	NSFNET_IGP      = 85, 
    	DGP             = 86, 
    	TCF             = 87, 
    	EIGRP           = 88, 
    	OSPFIGP         = 89, 
    	Sprite_RPC      = 90, 
    	LARP            = 91, 
    	MTP             = 92, 
    	AX_25           = 93, 
    	IPIP            = 94, 
    	SCC_SP          = 96, 
    	ETHERIP         = 97, 
    	ENCAP           = 98, 
    	GMTP            = 100, 
    	IFMP            = 101, 
    	PNNI            = 102, 
    	PIM             = 103, 
    	ARIS            = 104, 
    	SCPS            = 105, 
    	QNX             = 106, 
    	A_N             = 107, 
    	IPComp          = 108, 
    	SNP             = 109, 
    	Compaq_Peer     = 110, 
    	IPX_in_IP       = 111, 
    	VRRP            = 112, 
    	PGM             = 113, 
    	L2TP            = 115, 
    	DDX             = 116, 
    	IATP            = 117, 
    	STP             = 118, 
    	SRP             = 119, 
    	UTI             = 120, 
    	SMP             = 121, 
    	PTP             = 123, 
    	FIRE            = 125, 
    	CRTP            = 126, 
    	CRUDP           = 127, 
    	SSCOPMCE        = 128, 
    	IPLT            = 129, 
    	SPS             = 130, 
    	PIPE            = 131, 
    	SCTP            = 132, 
    	FC              = 133, 
    	RSVP_E2E_IGNORE = 134, 
    	UDPLite         = 136, 
    	MPLS_in_IP      = 137, 
    	manet           = 138, 
    	HIP             = 139, 
    	Shim6           = 140, 
    	WESP            = 141, 
    	ROHC            = 142, 
    	Ethernet        = 143, 
    	AGGFRAG         = 144, 
    	NSH             = 145, 
    	Reserved        = 255, 
    }
     

    The protocol number according to IANA protocol number list Full list of protocol numbers: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Supported by the OS protocols can be queried by reading: /etc/protocols

    Related Procedures With Parameters

    Protocol_Family ¶

    Protocol_Family :: enum u16 {
    	UNSPEC     = 0, 
    	LOCAL      = 1, 
    	UNIX       = 1, 
    	FILE       = 1, 
    	INET       = 2, 
    	AX25       = 3, 
    	IPX        = 4, 
    	APPLETALK  = 5, 
    	NETROM     = 6, 
    	BRIDGE     = 7, 
    	ATMPVC     = 8, 
    	X25        = 9, 
    	INET6      = 10, 
    	ROSE       = 11, 
    	DECnet     = 12, 
    	NETBEUI    = 13, 
    	SECURITY   = 14, 
    	KEY        = 15, 
    	NETLINK    = 16, 
    	ROUTE      = 16, 
    	PACKET     = 17, 
    	ASH        = 18, 
    	ECONET     = 19, 
    	ATMSVC     = 20, 
    	RDS        = 21, 
    	SNA        = 22, 
    	IRDA       = 23, 
    	PPPOX      = 24, 
    	WANPIPE    = 25, 
    	LLC        = 26, 
    	IB         = 27, 
    	MPLS       = 28, 
    	CAN        = 29, 
    	TIPC       = 30, 
    	BLUETOOTH  = 31, 
    	IUCV       = 32, 
    	RXRPC      = 33, 
    	ISDN       = 34, 
    	PHONET     = 35, 
    	IEEE802154 = 36, 
    	CAIF       = 37, 
    	ALG        = 38, 
    	NFC        = 39, 
    	VSOCK      = 40, 
    	KCM        = 41, 
    	QIPCRTR    = 42, 
    	SMC        = 43, 
    	XDP        = 44, 
    	MCTP       = 45, 
    }
     

    Protocol family

    Related Procedures With Parameters

    RISCV_HWProbe ¶

    RISCV_HWProbe :: struct {
    	// set to `.UNSUPPORTED` by the kernel if that is the case.
    	key:   RISCV_HWProbe_Key,
    	value: struct #raw_union {
    		base_behavior:          bit_set[RISCV_HWProbe_Base_Behavior_Bits; u64],
    		ima_ext_0:              bit_set[RISCV_HWProbe_IMA_Ext_0_Bits; u64],
    		cpu_perf_0:             bit_set[RISCV_HWProbe_Misaligned_Scalar_Perf; u64],
    		misaligned_scalar_perf: RISCV_HWProbe_Misaligned_Scalar_Perf,
    		raw:                    u64,
    	},
    }

    RISCV_HWProbe_Base_Behavior_Bits ¶

    RISCV_HWProbe_Base_Behavior_Bits :: enum int {
    	IMA, 
    }

    RISCV_HWProbe_Flags_Bits ¶

    RISCV_HWProbe_Flags_Bits :: enum int {
    	WHICH_CPUS, 
    }

    RISCV_HWProbe_IMA_Ext_0_Bits ¶

    RISCV_HWProbe_IMA_Ext_0_Bits :: enum int {
    	FD, 
    	C, 
    	V, 
    	EXT_ZBA, 
    	EXT_ZBB, 
    	EXT_ZBS, 
    	EXT_ZICBOZ, 
    	EXT_ZBC, 
    	EXT_ZBKB, 
    	EXT_ZBKC, 
    	EXT_ZBKX, 
    	EXT_ZKND, 
    	EXT_ZKNE, 
    	EXT_ZKNH, 
    	EXT_ZKSED, 
    	EXT_ZKSH, 
    	EXT_ZKT, 
    	EXT_ZVBB, 
    	EXT_ZVBC, 
    	EXT_ZVKB, 
    	EXT_ZVKG, 
    	EXT_ZVKNED, 
    	EXT_ZVKNHA, 
    	EXT_ZVKNHB, 
    	EXT_ZVKSED, 
    	EXT_ZVKSH, 
    	EXT_ZVKT, 
    	EXT_ZFH, 
    	EXT_ZFHMIN, 
    	EXT_ZIHINTNTL, 
    	EXT_ZVFH, 
    	EXT_ZVFHMIN, 
    	EXT_ZFA, 
    	EXT_ZTSO, 
    	EXT_ZACAS, 
    	EXT_ZICOND, 
    	EXT_ZIHINTPAUSE, 
    	EXT_ZVE32X, 
    	EXT_ZVE32F, 
    	EXT_ZVE64X, 
    	EXT_ZVE64F, 
    	EXT_ZVE64D, 
    	EXT_ZIMOP, 
    	EXT_ZCA, 
    	EXT_ZCB, 
    	EXT_ZCD, 
    	EXT_ZCF, 
    	EXT_ZCMOP, 
    	EXT_ZAWRS, 
    }

    RISCV_HWProbe_Key ¶

    RISCV_HWProbe_Key :: enum i64 {
    	UNSUPPORTED            = -1, 
    	MVENDORID              = 0, 
    	MARCHID                = 1, 
    	MIMPID                 = 2, 
    	BASE_BEHAVIOR          = 3, 
    	IMA_EXT_0              = 4, 
    	// Deprecated, try `.MISALIGNED_SCALAR_PERF` first, if that is `.UNSUPPORTED`, use this.
    	CPUPERF_0              = 5, 
    	ZICBOZ_BLOCK_SIZE      = 6, 
    	HIGHEST_VIRT_ADDRESS   = 7, 
    	TIME_CSR_FREQ          = 8, 
    	MISALIGNED_SCALAR_PERF = 9, 
    }

    RISCV_HWProbe_Misaligned_Scalar_Perf ¶

    RISCV_HWProbe_Misaligned_Scalar_Perf :: enum int {
    	UNKNOWN, 
    	EMULATED, 
    	SLOW, 
    	FAST, 
    	UNSUPPORTED, 
    }

    RLimit ¶

    RLimit :: struct {
    	cur: uint,
    	max: uint,
    }
     

    Resource limit

    Related Procedures With Parameters

    RLimit_Kind ¶

    RLimit_Kind :: enum i32 {
    	CPU        = 0, 
    	FSIZE      = 1, 
    	DATA       = 2, 
    	STACK      = 3, 
    	CORE       = 4, 
    	RSS        = 5, 
    	NOFILE     = 7, 
    	AS         = 9, 
    	NPROC      = 6, 
    	MEMLOCK    = 8, 
    	LOCKS      = 10, 
    	SIGPENDING = 11, 
    	MSGQUEUE   = 12, 
    	NICE       = 13, 
    	RTPRIO     = 14, 
    	RTTIME     = 15, 
    	NLIMITS    = 16, 
    }
     

    The kind of resource limits

    Related Procedures With Parameters

    RUsage ¶

    RUsage :: struct {
    	utime:         Time_Val,
    	stime:         Time_Val,
    	maxrss_word:   int,
    	ixrss_word:    int,
    	idrss_word:    int,
    	isrss_word:    int,
    	minflt_word:   int,
    	majflt_word:   int,
    	nswap_word:    int,
    	inblock_word:  int,
    	oublock_word:  int,
    	msgsnd_word:   int,
    	msgrcv_word:   int,
    	nsignals_word: int,
    	nvcsw_word:    int,
    	nivcsw_word:   int,
    }
     

    Structure representing how much of each resource got used.

    Related Procedures With Parameters

    RUsage_Who ¶

    RUsage_Who :: enum i32 {
    	CHILDREN = -1, 
    	SELF     = 0, 
    	THREAD   = 1, 
    	LWP      = 1, 
    }
     

    Represents the user of resources

    Related Procedures With Parameters

    RW_Hint ¶

    RW_Hint :: enum u64 {
    	WRITE_LIFE_NOT_SET = 0, 
    	WRITE_LIFE_NONE    = 1, 
    	WRITE_LIFE_SHORT   = 2, 
    	WRITE_LIFE_MEDIUM  = 3, 
    	WRITE_LIFE_LONG    = 4, 
    	WRITE_LIFE_EXTREME = 5, 
    }
    Related Procedures With Parameters

    Rename_Flags ¶

    Rename_Flags :: bit_set[Rename_Flags_Bits; u32]
     

    Flags for rename(2).

    Rename_Flags_Bits ¶

    Rename_Flags_Bits :: enum int {
    	EXCHANGE  = 1, 
    	NOREPLACE = 0, 
    	WHITEOUT  = 2, 
    }
     

    Bits for Rename_Flags

    Seal ¶

    Seal :: bit_set[Seal_Bits; i32]
     

    Seals for fcntl_add_seals().

    Seal_Bits ¶

    Seal_Bits :: enum int {
    	SEAL         = 0, 
    	SHRINK       = 1, 
    	GROW         = 2, 
    	WRITE        = 3, 
    	FUTURE_WRITE = 4, 
    }
     

    Bits for seal

    Seek_Whence ¶

    Seek_Whence :: enum i16 {
    	SET  = 0, 
    	CUR  = 1, 
    	END  = 2, 
    	DATA = 3, 
    	HOLE = 4, 
    }
    Related Procedures With Parameters

    Sem_Buf ¶

    Sem_Buf :: struct {
    	num: u16,
    	op:  IPC_Cmd,
    	flg: bit_set[IPC_Flags_Bits; i16],
    }
     

    SystemV semaphore operation.

    Sem_Info ¶

    Sem_Info :: struct {
    	semmap: i32,
    	mni:    i32,
    	mns:    i32,
    	mnu:    i32,
    	msl:    i32,
    	opm:    i32,
    	ume:    i32,
    	usz:    i32,
    	vmx:    i32,
    	aem:    i32,
    }
     

    SystenV semaphore info.

    Sem_Un ¶

    Sem_Un :: struct #raw_union {
    	val:   i32,
    	buf:   rawptr,
    	array: u16,
    	__buf: Sem_Info,
    	_:     uintptr,
    }
     

    Argument for semctl functions

    Related Procedures With Parameters

    Semid_DS ¶

    Semid_DS :: _Arch_Semid_DS
     

    Architecture-specific semaphore data.

    Shm_Info ¶

    Shm_Info :: struct {
    	used_ids:       i32,
    	shm_tot:        uint,
    	shm_rss:        uint,
    	shm_swp:        uint,
    	swap_attempts:  uint,
    	swap_successes: uint,
    }
     

    SystemV shared memory info.

    Related Procedures With Parameters

    Shmid_DS ¶

    Shmid_DS :: _Arch_Shmid_DS
     

    SystemV shared memory data.

    Shutdown_How ¶

    Shutdown_How :: enum i32 {
    	RD   = 0, 
    	WR   = 1, 
    	RDWR = 2, 
    }
     

    Argument to shutdown(2)

    Related Procedures With Parameters

    Sig_Action ¶

    Sig_Action :: struct($T: typeid) {}
    Related Procedures With Parameters

    Sig_Action_Flag ¶

    Sig_Action_Flag :: enum u32 {
    	NOCLDSTOP      = 0, 
    	NOCLDWAIT      = 1, 
    	SIGINFO        = 2, 
    	UNSUPPORTED    = 10, 
    	EXPOSE_TAGBITS = 11, 
    	RESTORER       = 26, 
    	ONSTACK        = 27, 
    	RESTART        = 28, 
    	NODEFER        = 30, 
    	RESETHAND      = 31, 
    }

    Sig_Action_Flags ¶

    Sig_Action_Flags :: bit_set[Sig_Action_Flag; uint]

    Sig_Action_Special ¶

    Sig_Action_Special :: enum uint {
    	SIG_DFL = 0, 
    	SIG_IGN = 1, 
    	SIG_ERR = 18446744073709551615, 
    }

    Sig_Child_Code ¶

    Sig_Child_Code :: enum int {
    	NONE, 
    	EXITED, 
    	KILLED, 
    	DUMPED, 
    	TRAPPED, 
    	STOPPED, 
    	CONTINUED, 
    }
     

    Translation of code in Sig_Info for when signo is SIGCHLD

    Sig_Event ¶

    Sig_Event :: struct {
    	value:  Sig_Val,
    	signo:  i32,
    	notify: i32,
    	using _: struct #raw_union {
    		_:         [16]u32,
    		thread_id: Pid,
    		using _:   struct {
    			notify_function:  proc "c" (val: Sig_Val),
    			notify_attribute: rawptr,
    		},
    	},
    }
    Related Procedures With Parameters

    Sig_Handler_Fn ¶

    Sig_Handler_Fn :: proc "c" (sig: Signal)

    Sig_Info ¶

    Sig_Info :: struct #packed {
    	signo:  Signal,
    	errno:  Errno,
    	code:   i32,
    	_pad0:  i32,
    	using _union: struct #raw_union {
    		_pad1:     [112]u8,
    		using _kill: struct {
    			pid: Pid,
    			// sender's pid 
    			uid: Uid,
    		},
    		using _timer: struct {
    			timerid: i32,
    			// timer id 
    			overrun: i32,
    			// overrun count 
    			value:   Sig_Val,
    		},
    		// POSIX.1b signals 
    		using _rt: struct {
    			_pid0: Pid,
    			// sender's pid 
    			_uid0: Uid,
    		},
    		// SIGCHLD 
    		using _sigchld: struct {
    			_pid1:  Pid,
    			// which child 
    			_uid1:  Uid,
    			// sender's uid 
    			status: i32,
    			// exit code 
    			utime:  uint,
    			stime:  uint,
    		},
    		// SIGILL, SIGFPE, SIGSEGV, SIGBUS 
    		using _sigfault: struct {
    			addr: rawptr,
    			// faulting insn/memory ref. 
    			using _: struct #raw_union {
    				trapno:     i32,
    				// Trap number that caused signal 
    				addr_lsb:   i16,
    				// LSB of the reported address 
    				using _addr_bnd: struct {
    					_pad2: u64,
    					lower: rawptr,
    					// lower bound during fault 
    					upper: rawptr,
    				},
    				using _addr_pkey: struct {
    					_pad3: u64,
    					pkey:  u32,
    				},
    				using _perf: struct {
    					perf_data:  u64,
    					perf_type:  u32,
    					perf_flags: u32,
    				},
    			},
    		},
    		// SIGPOLL 
    		using _sigpoll: struct {
    			band: int,
    			// POLL_IN, POLL_OUT, POLL_MSG 
    			fd:   Fd,
    		},
    		// SIGSYS 
    		using _sigsys: struct {
    			call_addr: rawptr,
    			// calling user insn 
    			syscall:   i32,
    			// triggering system call number 
    			arch:      u32,
    		},
    	},
    }
    Related Procedures With Parameters

    Sig_Mask_Kind ¶

    Sig_Mask_Kind :: enum i32 {
    	SIG_BLOCK   = 0, 
    	SIG_UNBLOCK = 1, 
    	SIG_SETMASK = 2, 
    }
    Related Procedures With Parameters

    Sig_Restore_Fn ¶

    Sig_Restore_Fn :: proc "c" () -> !

    Sig_Set ¶

    Sig_Set :: [1]uint

    Sig_Stack ¶

    Sig_Stack :: struct {
    	sp:    rawptr,
    	flags: bit_set[Sig_Stack_Flag; i32],
    	size:  uintptr,
    }
    Related Procedures With Parameters

    Sig_Stack_Flag ¶

    Sig_Stack_Flag :: enum i32 {
    	DISABLE    = 0, 
    	ONSTACK    = 1, 
    	AUTODISARM = 31, 
    }

    Sig_Stack_Flags ¶

    Sig_Stack_Flags :: bit_set[Sig_Stack_Flag; i32]

    Sig_Val ¶

    Sig_Val :: struct #raw_union {
    	sival_int: i32,
    	sival_ptr: rawptr,
    }

    Signal ¶

    Signal :: enum i32 {
    	// POSIX-defined signals
    	SIGINT    = 2,  // Interactive attention signal.
    	SIGILL    = 4,  // Illegal instruction.
    	SIGABRT   = 6,  // Abnormal termination.
    	SIGFPE    = 8,  // Erroneous arithmetic operation.
    	SIGSEGV   = 11, // Invalid access to storage.
    	SIGTERM   = 15, // Termination request.
    	// Other POSIX signals
    	SIGHUP    = 1,  // Hangup.
    	SIGQUIT   = 3,  // Quit.
    	SIGTRAP   = 5,  // Trace/breakpoint trap.
    	SIGKILL   = 9,  // Killed.
    	SIGPIPE   = 13, // Broken pipe.
    	SIGALRM   = 14, // Alarm clock.
    	// Adjustments needed for most linux systems
    	SIGSTKFLT = 16, // Stack fault (obsolete).
    	SIGPWR    = 30, // Power failure imminent.
    	// Historical signals specified by POSIX.
    	SIGBUS    = 7,  // Bus error.
    	SIGSYS    = 31, // Bad system call.
    	// New(er) POSIX signals (1003.1-2008, 1003.1-2013).
    	SIGURG    = 23, // Urgent data is available at a socket.
    	SIGSTOP   = 19, // Stop, unblockable.
    	SIGTSTP   = 20, // Keyboard stop.
    	SIGCONT   = 18, // Continue.
    	SIGCHLD   = 17, // Child terminated or stopped.
    	SIGTTIN   = 21, // Background read from control terminal.
    	SIGTTOU   = 22, // Background write to control terminal.
    	SIGPOLL   = 29, // Pollable event occurred (System V).
    	SIGXFSZ   = 25, // File size limit exceeded.
    	SIGXCPU   = 24, // CPU time limit exceeded.
    	SIGVTALRM = 26, // Virtual timer expired.
    	SIGPROF   = 27, // Profiling timer expired.
    	SIGUSR1   = 10, // User-defined signal 1.
    	SIGUSR2   = 12, // User-defined signal 2.
    	// Nonstandard signals found in all modern POSIX systems (including both BSD and Linux).
    	SIGWINCH  = 28, // Window size change (4.3 BSD, Sun).
    	// Archaic names for compatibility.
    	SIGIO     = 29, // I/O now possible (4.2 BSD).
    	SIGIOT    = 6,  // IOT instruction, abort() on a PDP-11.
    	SIGCLD    = 17, // Old System V name
    }
    Related Procedures With Parameters
    Related Procedures With Returns
    Related Constants

    Sock_Addr_Any ¶

    Sock_Addr_Any :: struct #raw_union {
    	using _: struct {
    		family: Address_Family,
    		port:   u16be,
    	},
    	using ipv4: Sock_Addr_In,
    	using ipv6: Sock_Addr_In6,
    	using uds: Sock_Addr_Un,
    }
     

    Struct representing an arbitrary socket address.

    Related Procedures With Parameters

    Sock_Addr_In ¶

    Sock_Addr_In :: struct #packed {
    	sin_family: Address_Family,
    	sin_port:   u16be,
    	sin_addr:   [4]u8,
    }
     

    Struct representing IPv4 socket address.

    Sock_Addr_In6 ¶

    Sock_Addr_In6 :: struct #packed {
    	sin6_family:   Address_Family,
    	sin6_port:     u16be,
    	sin6_flowinfo: u32,
    	sin6_addr:     [16]u8,
    	sin6_scope_id: u32,
    }
     

    Struct representing IPv6 socket address.

    Sock_Addr_Un ¶

    Sock_Addr_Un :: struct #packed {
    	sun_family: Address_Family,
    	sun_path:   [108]u8,
    }
     

    Struct representing Unix Domain Socket address

    Socket_API_Level ¶

    Socket_API_Level :: enum int {
    	// Comes from <bits/socket-constants.h>
    	SOCKET    = 1, 
    	// Copy-pasted from protocol numbers
    	TCP       = 6, 
    	UDP       = 17, 
    	// Comes from <bits/socket.h>
    	RAW       = 255, 
    	DECNET    = 261, 
    	X25       = 262, 
    	PACKET    = 263, 
    	ATM       = 264, 
    	AAL       = 265, 
    	IRDA      = 266, 
    	NETBEUI   = 267, 
    	LLC       = 268, 
    	DCCP      = 269, 
    	NETLINK   = 270, 
    	TIPC      = 271, 
    	RXRPC     = 272, 
    	PPPOL2TP  = 273, 
    	BLUETOOTH = 274, 
    	PNPIPE    = 275, 
    	RDS       = 276, 
    	IUCV      = 277, 
    	CAIF      = 278, 
    	ALG       = 279, 
    	NFC       = 280, 
    	KCM       = 281, 
    	TLS       = 282, 
    	XDP       = 283, 
    	MPTCP     = 284, 
    	MCTP      = 285, 
    	SMC       = 286, 
    }
     

    API Level for getsockopt(2)/setsockopt(2)

    Socket_API_Level_Raw ¶

    Socket_API_Level_Raw :: enum int {
    	// Comes from <bits/socket-constants.h>
    	SOCKET    = 1, 
    	// Copy-pasted from protocol numbers
    	TCP       = 6, 
    	UDP       = 17, 
    	// Comes from <bits/socket.h>
    	RAW       = 255, 
    	DECNET    = 261, 
    	X25       = 262, 
    	PACKET    = 263, 
    	ATM       = 264, 
    	AAL       = 265, 
    	IRDA      = 266, 
    	NETBEUI   = 267, 
    	LLC       = 268, 
    	DCCP      = 269, 
    	NETLINK   = 270, 
    	TIPC      = 271, 
    	RXRPC     = 272, 
    	PPPOL2TP  = 273, 
    	BLUETOOTH = 274, 
    	PNPIPE    = 275, 
    	RDS       = 276, 
    	IUCV      = 277, 
    	CAIF      = 278, 
    	ALG       = 279, 
    	NFC       = 280, 
    	KCM       = 281, 
    	TLS       = 282, 
    	XDP       = 283, 
    	MPTCP     = 284, 
    	MCTP      = 285, 
    	SMC       = 286, 
    }
    Related Constants

    Socket_API_Level_Sock ¶

    Socket_API_Level_Sock :: enum int {
    	// Comes from <bits/socket-constants.h>
    	SOCKET    = 1, 
    	// Copy-pasted from protocol numbers
    	TCP       = 6, 
    	UDP       = 17, 
    	// Comes from <bits/socket.h>
    	RAW       = 255, 
    	DECNET    = 261, 
    	X25       = 262, 
    	PACKET    = 263, 
    	ATM       = 264, 
    	AAL       = 265, 
    	IRDA      = 266, 
    	NETBEUI   = 267, 
    	LLC       = 268, 
    	DCCP      = 269, 
    	NETLINK   = 270, 
    	TIPC      = 271, 
    	RXRPC     = 272, 
    	PPPOL2TP  = 273, 
    	BLUETOOTH = 274, 
    	PNPIPE    = 275, 
    	RDS       = 276, 
    	IUCV      = 277, 
    	CAIF      = 278, 
    	ALG       = 279, 
    	NFC       = 280, 
    	KCM       = 281, 
    	TLS       = 282, 
    	XDP       = 283, 
    	MPTCP     = 284, 
    	MCTP      = 285, 
    	SMC       = 286, 
    }
    Related Procedures With Parameters
    Related Constants

    Socket_API_Level_TCP ¶

    Socket_API_Level_TCP :: enum int {
    	// Comes from <bits/socket-constants.h>
    	SOCKET    = 1, 
    	// Copy-pasted from protocol numbers
    	TCP       = 6, 
    	UDP       = 17, 
    	// Comes from <bits/socket.h>
    	RAW       = 255, 
    	DECNET    = 261, 
    	X25       = 262, 
    	PACKET    = 263, 
    	ATM       = 264, 
    	AAL       = 265, 
    	IRDA      = 266, 
    	NETBEUI   = 267, 
    	LLC       = 268, 
    	DCCP      = 269, 
    	NETLINK   = 270, 
    	TIPC      = 271, 
    	RXRPC     = 272, 
    	PPPOL2TP  = 273, 
    	BLUETOOTH = 274, 
    	PNPIPE    = 275, 
    	RDS       = 276, 
    	IUCV      = 277, 
    	CAIF      = 278, 
    	ALG       = 279, 
    	NFC       = 280, 
    	KCM       = 281, 
    	TLS       = 282, 
    	XDP       = 283, 
    	MPTCP     = 284, 
    	MCTP      = 285, 
    	SMC       = 286, 
    }
    Related Procedures With Parameters
    Related Constants

    Socket_API_Level_UDP ¶

    Socket_API_Level_UDP :: enum int {
    	// Comes from <bits/socket-constants.h>
    	SOCKET    = 1, 
    	// Copy-pasted from protocol numbers
    	TCP       = 6, 
    	UDP       = 17, 
    	// Comes from <bits/socket.h>
    	RAW       = 255, 
    	DECNET    = 261, 
    	X25       = 262, 
    	PACKET    = 263, 
    	ATM       = 264, 
    	AAL       = 265, 
    	IRDA      = 266, 
    	NETBEUI   = 267, 
    	LLC       = 268, 
    	DCCP      = 269, 
    	NETLINK   = 270, 
    	TIPC      = 271, 
    	RXRPC     = 272, 
    	PPPOL2TP  = 273, 
    	BLUETOOTH = 274, 
    	PNPIPE    = 275, 
    	RDS       = 276, 
    	IUCV      = 277, 
    	CAIF      = 278, 
    	ALG       = 279, 
    	NFC       = 280, 
    	KCM       = 281, 
    	TLS       = 282, 
    	XDP       = 283, 
    	MPTCP     = 284, 
    	MCTP      = 285, 
    	SMC       = 286, 
    }
    Related Procedures With Parameters
    Related Constants

    Socket_FD_Flags ¶

    Socket_FD_Flags :: bit_set[Socket_FD_Flags_Bits; int]
     

    Flags for the socket file descriptor. Note, on linux these are technically passed by OR'ing together with Socket_Type, our wrapper does this under the hood.

    Socket_FD_Flags_Bits ¶

    Socket_FD_Flags_Bits :: enum int {
    	NONBLOCK = 11, 
    	CLOEXEC  = 19, 
    }
     

    Bits for Socket_FD_Flags

    Socket_Msg ¶

    Socket_Msg :: bit_set[Socket_Msg_Bits; i32]
     

    Flags for the socket for send/recv calls.

    Socket_Msg_Bits ¶

    Socket_Msg_Bits :: enum int {
    	OOB          = 0, 
    	PEEK         = 1, 
    	DONTROUTE    = 2, 
    	TRYHARD      = 2, 
    	CTRUNC       = 3, 
    	PROXY        = 4, 
    	TRUNC        = 5, 
    	DONTWAIT     = 6, 
    	EOR          = 7, 
    	WAITALL      = 8, 
    	FIN          = 9, 
    	SYN          = 10, 
    	CONFIRM      = 11, 
    	RST          = 12, 
    	ERRQUEUE     = 13, 
    	NOSIGNAL     = 14, 
    	MORE         = 15, 
    	WAITFORONE   = 16, 
    	BATCH        = 18, 
    	ZEROCOPY     = 22, 
    	FASTOPEN     = 29, 
    	CMSG_CLOEXEC = 30, 
    }
     

    Bits for Socket_Msg

    Socket_Option ¶

    Socket_Option :: enum int {
    	DEBUG                         = 1, 
    	REUSEADDR                     = 2, 
    	TYPE                          = 3, 
    	ERROR                         = 4, 
    	DONTROUTE                     = 5, 
    	BROADCAST                     = 6, 
    	SNDBUF                        = 7, 
    	RCVBUF                        = 8, 
    	SNDBUFFORCE                   = 32, 
    	RCVBUFFORCE                   = 33, 
    	KEEPALIVE                     = 9, 
    	OOBINLINE                     = 10, 
    	NO_CHECK                      = 11, 
    	PRIORITY                      = 12, 
    	LINGER                        = 13, 
    	BSDCOMPAT                     = 14, 
    	REUSEPORT                     = 15, 
    	PASSCRED                      = 16, 
    	PEERCRED                      = 17, 
    	RCVLOWAT                      = 18, 
    	SNDLOWAT                      = 19, 
    	RCVTIMEO_OLD                  = 20, 
    	SNDTIMEO_OLD                  = 21, 
    	SECURITY_AUTHENTICATION       = 22, 
    	SECURITY_ENCRYPTION_TRANSPORT = 23, 
    	SECURITY_ENCRYPTION_NETWORK   = 24, 
    	BINDTODEVICE                  = 25, 
    	ATTACH_FILTER                 = 26, 
    	DETACH_FILTER                 = 27, 
    	GET_FILTER                    = 26, 
    	PEERNAME                      = 28, 
    	ACCEPTCONN                    = 30, 
    	PEERSEC                       = 31, 
    	PASSSEC                       = 34, 
    	MARK                          = 36, 
    	PROTOCOL                      = 38, 
    	DOMAIN                        = 39, 
    	RXQ_OVFL                      = 40, 
    	WIFI_STATUS                   = 41, 
    	PEEK_OFF                      = 42, 
    	NOFCS                         = 43, 
    	LOCK_FILTER                   = 44, 
    	SELECT_ERR_QUEUE              = 45, 
    	BUSY_POLL                     = 46, 
    	MAX_PACING_RATE               = 47, 
    	BPF_EXTENSIONS                = 48, 
    	INCOMING_CPU                  = 49, 
    	ATTACH_BPF                    = 50, 
    	DETACH_BPF                    = 27, 
    	ATTACH_REUSEPORT_CBPF         = 51, 
    	ATTACH_REUSEPORT_EBPF         = 52, 
    	CNX_ADVICE                    = 53, 
    	TIMESTAMPING_OPT_STATS        = 54, 
    	MEMINFO                       = 55, 
    	INCOMING_NAPI_ID              = 56, 
    	COOKIE                        = 57, 
    	TIMESTAMPING_PKTINFO          = 58, 
    	PEERGROUPS                    = 59, 
    	ZEROCOPY                      = 60, 
    	TXTIME                        = 61, 
    	BINDTOIFINDEX                 = 62, 
    	TIMESTAMP_OLD                 = 29, 
    	TIMESTAMPNS_OLD               = 35, 
    	TIMESTAMPING_OLD              = 37, 
    	TIMESTAMP_NEW                 = 63, 
    	TIMESTAMPNS_NEW               = 64, 
    	TIMESTAMPING_NEW              = 65, 
    	RCVTIMEO_NEW                  = 66, 
    	SNDTIMEO_NEW                  = 67, 
    	DETACH_REUSEPORT_BPF          = 68, 
    	PREFER_BUSY_POLL              = 69, 
    	BUSY_POLL_BUDGET              = 70, 
    	NETNS_COOKIE                  = 71, 
    	BUF_LOCK                      = 72, 
    	RESERVE_MEM                   = 73, 
    	TXREHASH                      = 74, 
    	RCVMARK                       = 75, 
    	TIMESTAMP                     = 29, 
    	TIMESTAMPNS                   = 35, 
    	TIMESTAMPING                  = 37, 
    	RCVTIMEO                      = 20, 
    	SNDTIMEO                      = 21, 
    }
     

    If Socket_API_Level == .SOCKET, these are the options you can specify in getsockopt(2)/setsockopt(2)

    Related Procedures With Parameters

    Socket_TCP_Option ¶

    Socket_TCP_Option :: enum int {
    	NODELAY              = 1, 
    	MAXSEG               = 2, 
    	CORK                 = 3, 
    	KEEPIDLE             = 4, 
    	KEEPINTVL            = 5, 
    	KEEPCNT              = 6, 
    	SYNCNT               = 7, 
    	LINGER2              = 8, 
    	DEFER_ACCEPT         = 9, 
    	WINDOW_CLAMP         = 10, 
    	INFO                 = 11, 
    	QUICKACK             = 12, 
    	CONGESTION           = 13, 
    	MD5SIG               = 14, 
    	COOKIE_TRANSACTIONS  = 15, 
    	THIN_LINEAR_TIMEOUTS = 16, 
    	THIN_DUPACK          = 17, 
    	USER_TIMEOUT         = 18, 
    	REPAIR               = 19, 
    	REPAIR_QUEUE         = 20, 
    	QUEUE_SEQ            = 21, 
    	REPAIR_OPTIONS       = 22, 
    	FASTOPEN             = 23, 
    	TIMESTAMP            = 24, 
    	NOTSENT_LOWAT        = 25, 
    	CC_INFO              = 26, 
    	SAVE_SYN             = 27, 
    	SAVED_SYN            = 28, 
    	REPAIR_WINDOW        = 29, 
    	FASTOPEN_CONNECT     = 30, 
    	ULP                  = 31, 
    	MD5SIG_EXT           = 32, 
    	FASTOPEN_KEY         = 33, 
    	FASTOPEN_NO_COOKIE   = 34, 
    	ZEROCOPY_RECEIVE     = 35, 
    	INQ                  = 36, 
    	CM_INQ               = 36, 
    	TX_DELAY             = 37, 
    }
    Related Procedures With Parameters

    Socket_Type ¶

    Socket_Type :: enum int {
    	STREAM    = 1, 
    	DGRAM     = 2, 
    	RAW       = 3, 
    	RDM       = 4, 
    	SEQPACKET = 5, 
    	DCCP      = 6, 
    	PACKET    = 10, 
    }
     

    Type of socket to create For TCP you want to use SOCK_STREAM For UDP you want to use SOCK_DGRAM Also see Protocol

    Related Procedures With Parameters

    Socket_UDP_Option ¶

    Socket_UDP_Option :: enum int {
    	CORK         = 1, 
    	ENCAP        = 100, 
    	NO_CHECK6_TX = 101, 
    	NO_CHECK6_RX = 102, 
    	SEGMENT      = 103, 
    	GRO          = 104, 
    }
    Related Procedures With Parameters

    Splice_Flags ¶

    Splice_Flags :: bit_set[Splice_Flags_Bits; u32]
     

    Flags for splice(2) and tee(2) syscalls.

    Splice_Flags_Bits ¶

    Splice_Flags_Bits :: enum int {
    	MOVE     = 1, 
    	NONBLOCK = 2, 
    	MORE     = 4, 
    	GIFT     = 8, 
    }
     

    Bits for splice flags.

    Stat ¶

    Stat :: struct {
    	using _impl_stat: _Arch_Stat,
    }
     

    Represents the file state. If you're on 32-bit platform, consider using Stat64 instead.

    Related Procedures With Parameters

    Stat_FS ¶

    Stat_FS :: struct {
    	using _impl_stat_fs: _Arch_Stat_FS,
    }
     

    Struct for statfs(2).

    Related Procedures With Parameters

    Statx ¶

    Statx :: struct {
    	mask:             bit_set[Statx_Mask_Bits; u32],
    	blksize:          u32,
    	attributes:       bit_set[Statx_Attr_Bits; u64],
    	nlink:            u32,
    	uid:              Uid,
    	gid:              Gid,
    	// Note(flysand): mode is 16-bit on linux + there's
    	// 16-bit padding following it. Since our mode is 32-bits,
    	// we're using the padding. This should be fine because
    	// the placement of that padding suggests it was going to
    	// be used for the Mode bits anyway.
    	mode:             bit_set[Mode_Bits; u32],
    	ino:              Inode,
    	size:             u64,
    	blocks:           u64,
    	attributes_mask:  bit_set[Statx_Attr_Bits; u64],
    	atime:            Statx_Timestamp,
    	btime:            Statx_Timestamp,
    	ctime:            Statx_Timestamp,
    	mtime:            Statx_Timestamp,
    	rdev_major:       u32,
    	rdev_minor:       u32,
    	dev_major:        u32,
    	dev_minor:        u32,
    	mnt_id:           u64,
    	dio_mem_align:    u32,
    	dio_offset_align: u32,
    	_:                [12]u64,
    }
     

    The extended Stat struct, the argument to statx(2) syscall.

    Related Procedures With Parameters

    Statx_Attr ¶

    Statx_Attr :: bit_set[Statx_Attr_Bits; u64]
     

    File attributes, returned by statx. This bitset is also used to specify which attributes are present, not just their value.

    Statx_Attr_Bits ¶

    Statx_Attr_Bits :: enum int {
    	COMPRESSED = 2,  // 0x00000004
    	IMMUTABLE  = 4,  // 0x00000010
    	APPEND     = 5,  // 0x00000020
    	NODUMP     = 6,  // 0x00000040
    	ENCRYPTED  = 11, // 0x00000800
    	AUTOMOUNT  = 12, // 0x00001000
    	MOUNT_ROOT = 13, // 0x00002000
    	VERITY     = 20, // 0x00100000
    	DAX        = 21, // 0x00200000
    }
     

    Bits found in Statx_Attr bitset You should not use these directly

    Statx_Mask ¶

    Statx_Mask :: bit_set[Statx_Mask_Bits; u32]
     

    Query params/results for statx().

    Related Constants

    Statx_Mask_Bits ¶

    Statx_Mask_Bits :: enum int {
    	TYPE     = 0, 
    	MODE     = 1, 
    	NLINK    = 2, 
    	UID      = 3, 
    	GID      = 4, 
    	ATIME    = 5, 
    	MTIME    = 6, 
    	CTIME    = 7, 
    	INO      = 8, 
    	SIZE     = 9, 
    	BLOCKS   = 10, 
    	BTIME    = 11, 
    	MNT_ID   = 12, 
    	DIOALIGN = 13, 
    }
     

    The bits used by the Statx_Mask bitset

    Statx_Timestamp ¶

    Statx_Timestamp :: struct {
    	sec:  i64,
    	nsec: u32,
    	_:    i32,
    }
     

    Timestamp type used for Statx struct

    Sys_Info ¶

    Sys_Info :: struct {
    	uptime:    int,
    	loads:     [3]int,
    	totalram:  uint,
    	freeram:   uint,
    	sharedram: uint,
    	bufferram: uint,
    	totalswap: uint,
    	freeswap:  uint,
    	procs:     u16,
    	totalhigh: uint,
    	freehigh:  uint,
    	mem_unit:  i32,
    	_padding:  [0]u8,
    }
     

    Return buffer for the sysinfo syscall

    Related Procedures With Parameters

    Syslog_Action ¶

    Syslog_Action :: enum i32 {
    	CLOSE         = 0, 
    	OPEN          = 1, 
    	READ          = 2, 
    	READ_ALL      = 3, 
    	READ_CLEAR    = 4, 
    	CLEAR         = 5, 
    	CONSOLE_OFF   = 6, 
    	CONSOLE_ON    = 7, 
    	CONSOLE_LEVEL = 8, 
    	SIZE_UNREAD   = 9, 
    	SIZE_BUFFER   = 10, 
    }
     

    Syslog actions.

    Related Procedures With Parameters

    Time_Spec ¶

    Time_Spec :: struct {
    	time_sec:  uint,
    	time_nsec: uint,
    }
     

    Represents time with nanosecond precision.

    Related Procedures With Parameters
    Related Procedures With Returns

    Time_Val ¶

    Time_Val :: struct {
    	seconds:      int,
    	microseconds: int,
    }
     

    Represents time with millisecond precision.

    Related Procedures With Parameters

    Timer ¶

    Timer :: distinct i32
     

    Represents timer IDs.

    Related Procedures With Parameters

    Tms ¶

    Tms :: struct {
    	tms_utime:  int,
    	tms_stime:  int,
    	tms_cutime: int,
    	tms_cstime: int,
    }
     

    Times

    Related Procedures With Parameters

    UPD_Encapsulation ¶

    UPD_Encapsulation :: enum int {
    	ENCAP_ESPINUDP_NON_IKE = 1, 
    	ENCAP_ESPINUDP         = 2, 
    	ENCAP_L2TPINUDP        = 3, 
    	ENCAP_GTP0             = 4, 
    	ENCAP_GTP1U            = 5, 
    }

    UTS_Name ¶

    UTS_Name :: struct {
    	sysname:    [65]u8 `fmt:"s,0"`,
    	nodename:   [65]u8 `fmt:"s,0"`,
    	release:    [65]u8 `fmt:"s,0"`,
    	version:    [65]u8 `fmt:"s,0"`,
    	machine:    [65]u8 `fmt:"s,0"`,
    	domainname: [65]u8 `fmt:"s,0"`,
    }
     

    "Unix time-sharing system name", allegedly. Basically system info.

    Related Procedures With Parameters

    UTim_Buf ¶

    UTim_Buf :: struct {
    	actime:  uint,
    	modtime: uint,
    }
     

    Access and modification times for files

    Uid ¶

    Uid :: distinct u32
     

    Type for 32-bit User IDs.

    Related Procedures With Parameters
    Related Procedures With Returns

    User_FPX_Regs ¶

    User_FPX_Regs :: _Arch_User_FPX_Regs
     

    Architecture-specific extended floating-point registers. Currently only used for x86 CPU's.

    User_FP_Regs ¶

    User_FP_Regs :: _Arch_User_FP_Regs
     

    Architecture-specific floating-point registers

    User_Regs ¶

    User_Regs :: _Arch_User_Regs
     

    Architecture-specific registers struct.

    Wait_Option ¶

    Wait_Option :: enum int {
    	WNOHANG     = 0, 
    	WUNTRACED   = 1, 
    	WSTOPPED    = 1, 
    	WEXITED     = 2, 
    	WCONTINUED  = 3, 
    	WNOWAIT     = 24, 
    	// // For processes created using clone
    	__WNOTHREAD = 29, 
    	__WALL      = 30, 
    	__WCLONE    = 31, 
    }
     

    Options for wait syscalls

    Wait_Options ¶

    Wait_Options :: bit_set[Wait_Option; i32]
     

    Options for wait4(2) and waitpid(2).

    Constants

    ADDR_COMPAT_LAYOUT ¶

    ADDR_COMPAT_LAYOUT :: 21

    ADDR_LIMIT_32BIT ¶

    ADDR_LIMIT_32BIT :: 23

    ADDR_LIMIT_3GB ¶

    ADDR_LIMIT_3GB :: 27

    ADDR_NO_RANDOMIZE ¶

    ADDR_NO_RANDOMIZE :: 18

    AT_FDCWD ¶

    AT_FDCWD :: Fd(-100)
     

    Special file descriptor to pass to *at functions to specify that relative paths are relative to current directory.

    FDPIC_FUNCPTRS ¶

    FDPIC_FUNCPTRS :: 19

    FUTEX_CMP_REQUEUE ¶

    FUTEX_CMP_REQUEUE :: Futex_Cmp_Requeue_Type(.CMP_REQUEUE)
     

    Requeue waiters from one futex to another if the value at mutex matches.

    FUTEX_CMP_REQUEUE_PI ¶

    FUTEX_CMP_REQUEUE_PI :: Futex_Cmp_requeue_Pi_Type(.CMP_REQUEUE_PI)

    FUTEX_FD ¶

    FUTEX_FD :: Futex_Fd_Type(.FD)
     

    Not implemented. Basically, since.

    FUTEX_LOCK_PI ¶

    FUTEX_LOCK_PI :: Futex_Lock_Pi_Type(.LOCK_PI)
     

    TODO(flysand): Priority inversion futexes

    FUTEX_LOCK_PI2 ¶

    FUTEX_LOCK_PI2 :: Futex_Lock_Pi2_Type(.LOCK_PI2)

    FUTEX_REQUEUE ¶

    FUTEX_REQUEUE :: Futex_Requeue_Type(.REQUEUE)
     

    Requeue waiters from one futex to another.

    FUTEX_TRYLOCK_PI ¶

    FUTEX_TRYLOCK_PI :: Futex_Trylock_Pi_Type(.TRYLOCK_PI)

    FUTEX_UNLOCK_PI ¶

    FUTEX_UNLOCK_PI :: Futex_Unlock_Pi_Type(.UNLOCK_PI)

    FUTEX_WAIT ¶

    FUTEX_WAIT :: Futex_Wait_Type(.WAIT)
     

    Wait on futex wakeup signal.

    FUTEX_WAIT_BITSET ¶

    FUTEX_WAIT_BITSET :: Futex_Wait_Bitset_Type(.WAIT_BITSET)
     

    Wait on a futex, but the value is a bitset.

    FUTEX_WAIT_REQUEUE_PI ¶

    FUTEX_WAIT_REQUEUE_PI :: Futex_Wait_requeue_Pi_Type(.WAIT_REQUEUE_PI)

    FUTEX_WAKE ¶

    FUTEX_WAKE :: Futex_Wake_Type(.WAKE)
     

    Wake up other processes waiting on the futex.

    FUTEX_WAKE_BITSET ¶

    FUTEX_WAKE_BITSET :: Futex_Wake_Bitset_Type(.WAKE_BITSET)
     

    Wait on a futex, but the value is a bitset.

    FUTEX_WAKE_OP ¶

    FUTEX_WAKE_OP :: Futex_Wake_Op_Type(.WAKE_OP)
     

    See man pages, I'm not describing it here.

    F_ADD_SEALS ¶

    F_ADD_SEALS :: FCntl_Command_ADD_SEALS(.ADD_SEALS)

    F_DUPFD ¶

    F_DUPFD :: FCntl_Command_DUPFD(.DUPFD)

    F_DUPFD_CLOEXEC ¶

    F_DUPFD_CLOEXEC :: FCntl_Command_DUPFD_CLOEXEC(.DUPFD_CLOEXEC)

    F_GETFD ¶

    F_GETFD :: FCntl_Command_GETFD(.GETFD)

    F_GETFL ¶

    F_GETFL :: FCntl_Command_GETFL(.GETFL)

    F_GETLEASE ¶

    F_GETLEASE :: FCntl_Command_GETLEASE(.GETLEASE)

    F_GETLK ¶

    F_GETLK :: FCntl_Command_GETLK(.GETLK)
     

    F_GETLK64 :: FCntl_Command_GETLK64(.GETLK64) F_SETLK64 :: FCntl_Command_SETLK64(.SETLK64) F_SETLKW64 :: FCntl_Command_SETLKW64(.SETLKW64)

    F_GETOWN ¶

    F_GETOWN :: FCntl_Command_GETOWN(.GETOWN)

    F_GETOWN_EX ¶

    F_GETOWN_EX :: FCntl_Command_GETOWN_EX(.GETOWN_EX)

    F_GETPIPE_SZ ¶

    F_GETPIPE_SZ :: FCntl_Command_GETPIPE_SZ(.GETPIPE_SZ)

    F_GETSIG ¶

    F_GETSIG :: FCntl_Command_GETSIG(.GETSIG)

    F_GET_FILE_RW_HINT ¶

    F_GET_FILE_RW_HINT :: FCntl_Command_GET_FILE_RW_HINT(.GET_FILE_RW_HINT)

    F_GET_RW_HINT ¶

    F_GET_RW_HINT :: FCntl_Command_GET_RW_HINT(.GET_RW_HINT)

    F_GET_SEALS ¶

    F_GET_SEALS :: FCntl_Command_GET_SEALS(.GET_SEALS)

    F_NOTIFY ¶

    F_NOTIFY :: FCntl_Command_NOTIFY(.NOTIFY)

    F_OK ¶

    F_OK: bit_set[Mode_Bits; u32] : Mode{}
     

    For access.2 syscall family: instruct to check if the file exists.

    F_SETFD ¶

    F_SETFD :: FCntl_Command_SETFD(.SETFD)

    F_SETFL ¶

    F_SETFL :: FCntl_Command_SETFL(.SETFL)

    F_SETLEASE ¶

    F_SETLEASE :: FCntl_Command_SETLEASE(.SETLEASE)

    F_SETLK ¶

    F_SETLK :: FCntl_Command_SETLK(.SETLK)

    F_SETLKW ¶

    F_SETLKW :: FCntl_Command_SETLKW(.SETLKW)

    F_SETOWN ¶

    F_SETOWN :: FCntl_Command_SETOWN(.SETOWN)

    F_SETOWN_EX ¶

    F_SETOWN_EX :: FCntl_Command_SETOWN_EX(.SETOWN_EX)

    F_SETPIPE_SZ ¶

    F_SETPIPE_SZ :: FCntl_Command_SETPIPE_SZ(.SETPIPE_SZ)

    F_SETSIG ¶

    F_SETSIG :: FCntl_Command_SETSIG(.SETSIG)

    F_SET_FILE_RW_HINT ¶

    F_SET_FILE_RW_HINT :: FCntl_Command_SET_FILE_RW_HINT(.SET_FILE_RW_HINT)

    F_SET_RW_HINT ¶

    F_SET_RW_HINT :: FCntl_Command_SET_RW_HINT(.SET_RW_HINT)

    IPC_PRIVATE ¶

    IPC_PRIVATE :: Key(0)
     

    Tell shmget to create a new key

    MMAP_PAGE_ZERO ¶

    MMAP_PAGE_ZERO :: 20

    PER_BSD ¶

    PER_BSD :: 0x0006

    PER_HPUX ¶

    PER_HPUX :: 0x0010

    PER_IRIX32 ¶

    PER_IRIX32 :: 0x0009 | STICKY_TIMEOUTS

    PER_IRIX64 ¶

    PER_IRIX64 :: 0x000b | STICKY_TIMEOUTS

    PER_IRIXN32 ¶

    PER_IRIXN32 :: 0x000a | STICKY_TIMEOUTS

    PER_ISCR4 ¶

    PER_ISCR4 :: 0x0005 | STICKY_TIMEOUTS

    PER_LINUX ¶

    PER_LINUX :: 0x0000
     

    Personality type These go into the bottom 8 bits of the personality value

    PER_LINUX32 ¶

    PER_LINUX32 :: 0x0008

    PER_LINUX32_3GB ¶

    PER_LINUX32_3GB :: 0x0008 | ADDR_LIMIT_3GB

    PER_LINUX_32BIT ¶

    PER_LINUX_32BIT :: 0x0000 | ADDR_LIMIT_32BIT

    PER_LINUX_FDPIC ¶

    PER_LINUX_FDPIC :: 0x0000 | FDPIC_FUNCPTRS

    PER_MASK ¶

    PER_MASK :: 0x00ff

    PER_OSF4 ¶

    PER_OSF4 :: 0x000f

    PER_OSR5 ¶

    PER_OSR5 :: 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS

    PER_RISCOS ¶

    PER_RISCOS :: 0x000c

    PER_SCOSVR3 ¶

    PER_SCOSVR3 :: 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE

    PER_SOLARIS ¶

    PER_SOLARIS :: 0x000d | STICKY_TIMEOUTS

    PER_SUNOS ¶

    PER_SUNOS :: 0x0006 | STICKY_TIMEOUTS

    PER_SVR3 ¶

    PER_SVR3 :: 0x0002 | STICKY_TIMEOUTS | SHORT_INODE

    PER_SVR4 ¶

    PER_SVR4 :: 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO

    PER_UW7 ¶

    PER_UW7 :: 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO

    PER_WYSEV386 ¶

    PER_WYSEV386 :: 0x0004 | STICKY_TIMEOUTS | SHORT_INODE

    PER_XENIX ¶

    PER_XENIX :: 0x0007 | STICKY_TIMEOUTS | SHORT_INODE

    PRIO_MAX ¶

    PRIO_MAX :: 20
     

    Maximum priority (aka nice value) for the process.

    PRIO_MIN ¶

    PRIO_MIN :: -20
     

    Minimum priority (aka nice value) for the process.

    PTRACE_ARCH_PRCTL ¶

    PTRACE_ARCH_PRCTL :: PTrace_Arch_Prctl_Type(.ARCH_PRCTL)

    PTRACE_ATTACH ¶

    PTRACE_ATTACH :: PTrace_Attach_Type(.ATTACH)

    PTRACE_CONT ¶

    PTRACE_CONT :: PTrace_Cont_Type(.CONT)

    PTRACE_DETACH ¶

    PTRACE_DETACH :: PTrace_Detach_Type(.DETACH)

    PTRACE_GETEVENTMSG ¶

    PTRACE_GETEVENTMSG :: PTrace_Geteventmsg_Type(.GETEVENTMSG)

    PTRACE_GETFPREGS ¶

    PTRACE_GETFPREGS :: PTrace_Getfpregs_Type(.GETFPREGS)

    PTRACE_GETFPXREGS ¶

    PTRACE_GETFPXREGS :: PTrace_Getfpxregs_Type(.GETFPXREGS)

    PTRACE_GETREGS ¶

    PTRACE_GETREGS :: PTrace_Getregs_Type(.GETREGS)

    PTRACE_GETREGSET ¶

    PTRACE_GETREGSET :: PTrace_Getregset_Type(.GETREGSET)

    PTRACE_GETSIGINFO ¶

    PTRACE_GETSIGINFO :: PTrace_Getsiginfo_Type(.GETSIGINFO)

    PTRACE_GETSIGMASK ¶

    PTRACE_GETSIGMASK :: PTrace_Getsigmask_Type(.GETSIGMASK)

    PTRACE_GET_RSEQ_CONFIGURATION ¶

    PTRACE_GET_RSEQ_CONFIGURATION :: PTrace_Get_RSeq_Configuration_Type(.GET_RSEQ_CONFIGURATION)

    PTRACE_GET_SYSCALL_INFO ¶

    PTRACE_GET_SYSCALL_INFO :: PTrace_Get_Syscall_Info_Type(.GET_SYSCALL_INFO)

    PTRACE_GET_THREAD_AREA ¶

    PTRACE_GET_THREAD_AREA :: PTrace_Get_Thread_Area_Type(.GET_THREAD_AREA)

    PTRACE_INTERRUPT ¶

    PTRACE_INTERRUPT :: PTrace_Interrupt_Type(.INTERRUPT)

    PTRACE_KILL ¶

    PTRACE_KILL :: PTrace_Kill_Type(.KILL)

    PTRACE_LISTEN ¶

    PTRACE_LISTEN :: PTrace_Listen_Type(.LISTEN)

    PTRACE_PEEKDATA ¶

    PTRACE_PEEKDATA :: PTrace_Peek_Type(.PEEKDATA)

    PTRACE_PEEKSIGINFO ¶

    PTRACE_PEEKSIGINFO :: PTrace_Peeksiginfo_Type(.PEEKSIGINFO)

    PTRACE_PEEKTEXT ¶

    PTRACE_PEEKTEXT :: PTrace_Peek_Type(.PEEKTEXT)

    PTRACE_PEEKUSER ¶

    PTRACE_PEEKUSER :: PTrace_Peek_Type(.PEEKUSER)

    PTRACE_POKEDATA ¶

    PTRACE_POKEDATA :: PTrace_Poke_Type(.POKEDATA)

    PTRACE_POKETEXT ¶

    PTRACE_POKETEXT :: PTrace_Poke_Type(.POKETEXT)

    PTRACE_POKEUSER ¶

    PTRACE_POKEUSER :: PTrace_Poke_Type(.POKEUSER)

    PTRACE_SECCOMP_GET_FILTER ¶

    PTRACE_SECCOMP_GET_FILTER :: PTrace_Seccomp_Get_Filter_Type(.SECCOMP_GET_FILTER)

    PTRACE_SECCOMP_GET_METADATA ¶

    PTRACE_SECCOMP_GET_METADATA :: PTrace_Seccomp_Get_Metadata_Type(.SECCOMP_GET_METADATA)

    PTRACE_SEIZE ¶

    PTRACE_SEIZE :: PTrace_Seize_Type(.SEIZE)

    PTRACE_SETFPREGS ¶

    PTRACE_SETFPREGS :: PTrace_Setfpregs_Type(.SETFPREGS)

    PTRACE_SETFPXREGS ¶

    PTRACE_SETFPXREGS :: PTrace_Setfpxregs_Type(.SETFPXREGS)

    PTRACE_SETOPTIONS ¶

    PTRACE_SETOPTIONS :: PTrace_Setoptions_Type(.SETOPTIONS)

    PTRACE_SETREGS ¶

    PTRACE_SETREGS :: PTrace_Setregs_Type(.SETREGS)

    PTRACE_SETREGSET ¶

    PTRACE_SETREGSET :: PTrace_Setregset_Type(.SETREGSET)

    PTRACE_SETSIGINFO ¶

    PTRACE_SETSIGINFO :: PTrace_Setsiginfo_Type(.SETSIGINFO)

    PTRACE_SETSIGMASK ¶

    PTRACE_SETSIGMASK :: PTrace_Setsigmask_Type(.SETSIGMASK)

    PTRACE_SET_THREAD_AREA ¶

    PTRACE_SET_THREAD_AREA :: PTrace_Set_Thread_Area_Type(.SET_THREAD_AREA)

    PTRACE_SINGLEBLOCK ¶

    PTRACE_SINGLEBLOCK :: PTrace_Singleblock_Type(.SINGLEBLOCK)

    PTRACE_SINGLESTEP ¶

    PTRACE_SINGLESTEP :: PTrace_Singlestep_Type(.SINGLESTEP)

    PTRACE_SYSCALL ¶

    PTRACE_SYSCALL :: PTrace_Syscall_Type(.SYSCALL)

    PTRACE_SYSEMU ¶

    PTRACE_SYSEMU :: PTrace_Sysemu_Type(.SYSEMU)

    PTRACE_SYSEMU_SINGLESTEP ¶

    PTRACE_SYSEMU_SINGLESTEP :: PTrace_Sysemu_Singlestep_Type(.SYSEMU_SINGLESTEP)

    PTRACE_TRACEME ¶

    PTRACE_TRACEME :: PTrace_Traceme_Type(.TRACEME)

    READ_IMPLIES_EXEC ¶

    READ_IMPLIES_EXEC :: 22

    R_OK ¶

    R_OK: bit_set[Mode_Bits; u32] : Mode{.IROTH}
     

    For access.2 syscall family: instruct to check if the file is readable.

    SHORT_INODE ¶

    SHORT_INODE :: 24

    SIGEV_MAX_SIZE ¶

    SIGEV_MAX_SIZE :: 64

    SIGEV_PAD_SIZE ¶

    SIGEV_PAD_SIZE :: (SIGEV_MAX_SIZE - size_of(i32) * 2 + size_of(Sig_Val)) / size_of(i32)

    SIGRTMAX ¶

    SIGRTMAX :: Signal(64)

    SIGRTMIN ¶

    SIGRTMIN :: Signal(32)

    SOL_RAW ¶

    SOL_RAW :: Socket_API_Level_Raw(.RAW)

    SOL_SOCKET ¶

    SOL_SOCKET :: Socket_API_Level_Sock(.SOCKET)

    SOL_TCP ¶

    SOL_TCP :: Socket_API_Level_TCP(.TCP)

    SOL_UDP ¶

    SOL_UDP :: Socket_API_Level_UDP(.UDP)

    STATX_BASIC_STATS ¶

    STATX_BASIC_STATS: bit_set[Statx_Mask_Bits; u32] : Statx_Mask{.TYPE, .MODE, .NLINK, .UID, .GID, .ATIME, .MTIME, .CTIME, .INO, .SIZE, .BLOCKS}
     

    The stats you get by calling stat.

    STDERR_FILENO ¶

    STDERR_FILENO :: Fd(2)
     

    Standard error file descriptor

    STDIN_FILENO ¶

    STDIN_FILENO :: Fd(0)
     

    Standard input file descriptor

    STDOUT_FILENO ¶

    STDOUT_FILENO :: Fd(1)
     

    Standard output file descriptor

    STICKY_TIMEOUTS ¶

    STICKY_TIMEOUTS :: 26

    SYS__sysctl ¶

    SYS__sysctl :: uintptr(156)

    SYS_accept ¶

    SYS_accept :: uintptr(43)

    SYS_accept4 ¶

    SYS_accept4 :: uintptr(288)

    SYS_access ¶

    SYS_access :: uintptr(21)

    SYS_acct ¶

    SYS_acct :: uintptr(163)

    SYS_add_key ¶

    SYS_add_key :: uintptr(248)

    SYS_adjtimex ¶

    SYS_adjtimex :: uintptr(159)

    SYS_afs_syscall ¶

    SYS_afs_syscall :: uintptr(183)

    SYS_alarm ¶

    SYS_alarm :: uintptr(37)

    SYS_arch_prctl ¶

    SYS_arch_prctl :: uintptr(158)

    SYS_bind ¶

    SYS_bind :: uintptr(49)

    SYS_bpf ¶

    SYS_bpf :: uintptr(321)

    SYS_brk ¶

    SYS_brk :: uintptr(12)

    SYS_cachestat ¶

    SYS_cachestat :: uintptr(451)

    SYS_capget ¶

    SYS_capget :: uintptr(125)

    SYS_capset ¶

    SYS_capset :: uintptr(126)

    SYS_chdir ¶

    SYS_chdir :: uintptr(80)

    SYS_chmod ¶

    SYS_chmod :: uintptr(90)

    SYS_chown ¶

    SYS_chown :: uintptr(92)

    SYS_chroot ¶

    SYS_chroot :: uintptr(161)

    SYS_clock_adjtime ¶

    SYS_clock_adjtime :: uintptr(305)

    SYS_clock_getres ¶

    SYS_clock_getres :: uintptr(229)

    SYS_clock_gettime ¶

    SYS_clock_gettime :: uintptr(228)

    SYS_clock_nanosleep ¶

    SYS_clock_nanosleep :: uintptr(230)

    SYS_clock_settime ¶

    SYS_clock_settime :: uintptr(227)

    SYS_clone ¶

    SYS_clone :: uintptr(56)

    SYS_clone3 ¶

    SYS_clone3 :: uintptr(435)

    SYS_close ¶

    SYS_close :: uintptr(3)

    SYS_close_range ¶

    SYS_close_range :: uintptr(436)

    SYS_connect ¶

    SYS_connect :: uintptr(42)

    SYS_copy_file_range ¶

    SYS_copy_file_range :: uintptr(326)

    SYS_creat ¶

    SYS_creat :: uintptr(85)

    SYS_create_module ¶

    SYS_create_module :: uintptr(174)

    SYS_delete_module ¶

    SYS_delete_module :: uintptr(176)

    SYS_dup ¶

    SYS_dup :: uintptr(32)

    SYS_dup2 ¶

    SYS_dup2 :: uintptr(33)

    SYS_dup3 ¶

    SYS_dup3 :: uintptr(292)

    SYS_epoll_create ¶

    SYS_epoll_create :: uintptr(213)

    SYS_epoll_create1 ¶

    SYS_epoll_create1 :: uintptr(291)

    SYS_epoll_ctl ¶

    SYS_epoll_ctl :: uintptr(233)

    SYS_epoll_ctl_old ¶

    SYS_epoll_ctl_old :: uintptr(214)

    SYS_epoll_pwait ¶

    SYS_epoll_pwait :: uintptr(281)

    SYS_epoll_pwait2 ¶

    SYS_epoll_pwait2 :: uintptr(441)

    SYS_epoll_wait ¶

    SYS_epoll_wait :: uintptr(232)

    SYS_epoll_wait_old ¶

    SYS_epoll_wait_old :: uintptr(215)

    SYS_eventfd ¶

    SYS_eventfd :: uintptr(284)

    SYS_eventfd2 ¶

    SYS_eventfd2 :: uintptr(290)

    SYS_execve ¶

    SYS_execve :: uintptr(59)

    SYS_execveat ¶

    SYS_execveat :: uintptr(322)

    SYS_exit ¶

    SYS_exit :: uintptr(60)

    SYS_exit_group ¶

    SYS_exit_group :: uintptr(231)

    SYS_faccessat ¶

    SYS_faccessat :: uintptr(269)

    SYS_faccessat2 ¶

    SYS_faccessat2 :: uintptr(439)

    SYS_fadvise64 ¶

    SYS_fadvise64 :: uintptr(221)

    SYS_fallocate ¶

    SYS_fallocate :: uintptr(285)

    SYS_fanotify_init ¶

    SYS_fanotify_init :: uintptr(300)

    SYS_fanotify_mark ¶

    SYS_fanotify_mark :: uintptr(301)

    SYS_fchdir ¶

    SYS_fchdir :: uintptr(81)

    SYS_fchmod ¶

    SYS_fchmod :: uintptr(91)

    SYS_fchmodat ¶

    SYS_fchmodat :: uintptr(268)

    SYS_fchmodat2 ¶

    SYS_fchmodat2 :: uintptr(452)

    SYS_fchown ¶

    SYS_fchown :: uintptr(93)

    SYS_fchownat ¶

    SYS_fchownat :: uintptr(260)

    SYS_fcntl ¶

    SYS_fcntl :: uintptr(72)

    SYS_fdatasync ¶

    SYS_fdatasync :: uintptr(75)

    SYS_fgetxattr ¶

    SYS_fgetxattr :: uintptr(193)

    SYS_finit_module ¶

    SYS_finit_module :: uintptr(313)

    SYS_flistxattr ¶

    SYS_flistxattr :: uintptr(196)

    SYS_flock ¶

    SYS_flock :: uintptr(73)

    SYS_fork ¶

    SYS_fork :: uintptr(57)

    SYS_fremovexattr ¶

    SYS_fremovexattr :: uintptr(199)

    SYS_fsconfig ¶

    SYS_fsconfig :: uintptr(431)

    SYS_fsetxattr ¶

    SYS_fsetxattr :: uintptr(190)

    SYS_fsmount ¶

    SYS_fsmount :: uintptr(432)

    SYS_fsopen ¶

    SYS_fsopen :: uintptr(430)

    SYS_fspick ¶

    SYS_fspick :: uintptr(433)

    SYS_fstat ¶

    SYS_fstat :: uintptr(5)

    SYS_fstatfs ¶

    SYS_fstatfs :: uintptr(138)

    SYS_fsync ¶

    SYS_fsync :: uintptr(74)

    SYS_ftruncate ¶

    SYS_ftruncate :: uintptr(77)

    SYS_futex ¶

    SYS_futex :: uintptr(202)

    SYS_futex_waitv ¶

    SYS_futex_waitv :: uintptr(449)

    SYS_futimesat ¶

    SYS_futimesat :: uintptr(261)

    SYS_get_kernel_syms ¶

    SYS_get_kernel_syms :: uintptr(177)

    SYS_get_mempolicy ¶

    SYS_get_mempolicy :: uintptr(239)

    SYS_get_robust_list ¶

    SYS_get_robust_list :: uintptr(274)

    SYS_get_thread_area ¶

    SYS_get_thread_area :: uintptr(211)

    SYS_getcpu ¶

    SYS_getcpu :: uintptr(309)

    SYS_getcwd ¶

    SYS_getcwd :: uintptr(79)

    SYS_getdents ¶

    SYS_getdents :: uintptr(78)

    SYS_getdents64 ¶

    SYS_getdents64 :: uintptr(217)

    SYS_getegid ¶

    SYS_getegid :: uintptr(108)

    SYS_geteuid ¶

    SYS_geteuid :: uintptr(107)

    SYS_getgid ¶

    SYS_getgid :: uintptr(104)

    SYS_getgroups ¶

    SYS_getgroups :: uintptr(115)

    SYS_getitimer ¶

    SYS_getitimer :: uintptr(36)

    SYS_getpeername ¶

    SYS_getpeername :: uintptr(52)

    SYS_getpgid ¶

    SYS_getpgid :: uintptr(121)

    SYS_getpgrp ¶

    SYS_getpgrp :: uintptr(111)

    SYS_getpid ¶

    SYS_getpid :: uintptr(39)

    SYS_getpmsg ¶

    SYS_getpmsg :: uintptr(181)

    SYS_getppid ¶

    SYS_getppid :: uintptr(110)

    SYS_getpriority ¶

    SYS_getpriority :: uintptr(140)

    SYS_getrandom ¶

    SYS_getrandom :: uintptr(318)

    SYS_getresgid ¶

    SYS_getresgid :: uintptr(120)

    SYS_getresuid ¶

    SYS_getresuid :: uintptr(118)

    SYS_getrlimit ¶

    SYS_getrlimit :: uintptr(97)

    SYS_getrusage ¶

    SYS_getrusage :: uintptr(98)

    SYS_getsid ¶

    SYS_getsid :: uintptr(124)

    SYS_getsockname ¶

    SYS_getsockname :: uintptr(51)

    SYS_getsockopt ¶

    SYS_getsockopt :: uintptr(55)

    SYS_gettid ¶

    SYS_gettid :: uintptr(186)

    SYS_gettimeofday ¶

    SYS_gettimeofday :: uintptr(96)

    SYS_getuid ¶

    SYS_getuid :: uintptr(102)

    SYS_getxattr ¶

    SYS_getxattr :: uintptr(191)

    SYS_init_module ¶

    SYS_init_module :: uintptr(175)

    SYS_inotify_add_watch ¶

    SYS_inotify_add_watch :: uintptr(254)

    SYS_inotify_init ¶

    SYS_inotify_init :: uintptr(253)

    SYS_inotify_init1 ¶

    SYS_inotify_init1 :: uintptr(294)

    SYS_inotify_rm_watch ¶

    SYS_inotify_rm_watch :: uintptr(255)

    SYS_io_cancel ¶

    SYS_io_cancel :: uintptr(210)

    SYS_io_destroy ¶

    SYS_io_destroy :: uintptr(207)

    SYS_io_getevents ¶

    SYS_io_getevents :: uintptr(208)

    SYS_io_pgetevents ¶

    SYS_io_pgetevents :: uintptr(333)

    SYS_io_setup ¶

    SYS_io_setup :: uintptr(206)

    SYS_io_submit ¶

    SYS_io_submit :: uintptr(209)

    SYS_io_uring_enter ¶

    SYS_io_uring_enter :: uintptr(426)

    SYS_io_uring_register ¶

    SYS_io_uring_register :: uintptr(427)

    SYS_io_uring_setup ¶

    SYS_io_uring_setup :: uintptr(425)

    SYS_ioctl ¶

    SYS_ioctl :: uintptr(16)

    SYS_ioperm ¶

    SYS_ioperm :: uintptr(173)

    SYS_iopl ¶

    SYS_iopl :: uintptr(172)

    SYS_ioprio_get ¶

    SYS_ioprio_get :: uintptr(252)

    SYS_ioprio_set ¶

    SYS_ioprio_set :: uintptr(251)

    SYS_kcmp ¶

    SYS_kcmp :: uintptr(312)

    SYS_kexec_file_load ¶

    SYS_kexec_file_load :: uintptr(320)

    SYS_kexec_load ¶

    SYS_kexec_load :: uintptr(246)

    SYS_keyctl ¶

    SYS_keyctl :: uintptr(250)

    SYS_kill ¶

    SYS_kill :: uintptr(62)

    SYS_landlock_add_rule ¶

    SYS_landlock_add_rule :: uintptr(445)

    SYS_landlock_create_ruleset ¶

    SYS_landlock_create_ruleset :: uintptr(444)

    SYS_landlock_restrict_self ¶

    SYS_landlock_restrict_self :: uintptr(446)

    SYS_lchown ¶

    SYS_lchown :: uintptr(94)

    SYS_lgetxattr ¶

    SYS_lgetxattr :: uintptr(192)
    SYS_link :: uintptr(86)

    SYS_linkat ¶

    SYS_linkat :: uintptr(265)

    SYS_listen ¶

    SYS_listen :: uintptr(50)

    SYS_listxattr ¶

    SYS_listxattr :: uintptr(194)

    SYS_llistxattr ¶

    SYS_llistxattr :: uintptr(195)

    SYS_lookup_dcookie ¶

    SYS_lookup_dcookie :: uintptr(212)

    SYS_lremovexattr ¶

    SYS_lremovexattr :: uintptr(198)

    SYS_lseek ¶

    SYS_lseek :: uintptr(8)

    SYS_lsetxattr ¶

    SYS_lsetxattr :: uintptr(189)

    SYS_lstat ¶

    SYS_lstat :: uintptr(6)

    SYS_madvise ¶

    SYS_madvise :: uintptr(28)

    SYS_map_shadow_stack ¶

    SYS_map_shadow_stack :: uintptr(453)

    SYS_mbind ¶

    SYS_mbind :: uintptr(237)

    SYS_membarrier ¶

    SYS_membarrier :: uintptr(324)

    SYS_memfd_create ¶

    SYS_memfd_create :: uintptr(319)

    SYS_memfd_secret ¶

    SYS_memfd_secret :: uintptr(447)

    SYS_migrate_pages ¶

    SYS_migrate_pages :: uintptr(256)

    SYS_mincore ¶

    SYS_mincore :: uintptr(27)

    SYS_mkdir ¶

    SYS_mkdir :: uintptr(83)

    SYS_mkdirat ¶

    SYS_mkdirat :: uintptr(258)

    SYS_mknod ¶

    SYS_mknod :: uintptr(133)

    SYS_mknodat ¶

    SYS_mknodat :: uintptr(259)

    SYS_mlock ¶

    SYS_mlock :: uintptr(149)

    SYS_mlock2 ¶

    SYS_mlock2 :: uintptr(325)

    SYS_mlockall ¶

    SYS_mlockall :: uintptr(151)

    SYS_mmap ¶

    SYS_mmap :: uintptr(9)

    SYS_modify_ldt ¶

    SYS_modify_ldt :: uintptr(154)

    SYS_mount ¶

    SYS_mount :: uintptr(165)

    SYS_mount_setattr ¶

    SYS_mount_setattr :: uintptr(442)

    SYS_move_mount ¶

    SYS_move_mount :: uintptr(429)

    SYS_move_pages ¶

    SYS_move_pages :: uintptr(279)

    SYS_mprotect ¶

    SYS_mprotect :: uintptr(10)

    SYS_mq_getsetattr ¶

    SYS_mq_getsetattr :: uintptr(245)

    SYS_mq_notify ¶

    SYS_mq_notify :: uintptr(244)

    SYS_mq_open ¶

    SYS_mq_open :: uintptr(240)

    SYS_mq_timedreceive ¶

    SYS_mq_timedreceive :: uintptr(243)

    SYS_mq_timedsend ¶

    SYS_mq_timedsend :: uintptr(242)
    SYS_mq_unlink :: uintptr(241)

    SYS_mremap ¶

    SYS_mremap :: uintptr(25)

    SYS_msgctl ¶

    SYS_msgctl :: uintptr(71)

    SYS_msgget ¶

    SYS_msgget :: uintptr(68)

    SYS_msgrcv ¶

    SYS_msgrcv :: uintptr(70)

    SYS_msgsnd ¶

    SYS_msgsnd :: uintptr(69)

    SYS_msync ¶

    SYS_msync :: uintptr(26)

    SYS_munlock ¶

    SYS_munlock :: uintptr(150)

    SYS_munlockall ¶

    SYS_munlockall :: uintptr(152)

    SYS_munmap ¶

    SYS_munmap :: uintptr(11)

    SYS_name_to_handle_at ¶

    SYS_name_to_handle_at :: uintptr(303)

    SYS_nanosleep ¶

    SYS_nanosleep :: uintptr(35)

    SYS_newfstatat ¶

    SYS_newfstatat :: uintptr(262)

    SYS_nfsservctl ¶

    SYS_nfsservctl :: uintptr(180)

    SYS_open ¶

    SYS_open :: uintptr(2)

    SYS_open_by_handle_at ¶

    SYS_open_by_handle_at :: uintptr(304)

    SYS_open_tree ¶

    SYS_open_tree :: uintptr(428)

    SYS_openat ¶

    SYS_openat :: uintptr(257)

    SYS_openat2 ¶

    SYS_openat2 :: uintptr(437)

    SYS_pause ¶

    SYS_pause :: uintptr(34)

    SYS_perf_event_open ¶

    SYS_perf_event_open :: uintptr(298)

    SYS_personality ¶

    SYS_personality :: uintptr(135)

    SYS_pidfd_getfd ¶

    SYS_pidfd_getfd :: uintptr(438)

    SYS_pidfd_open ¶

    SYS_pidfd_open :: uintptr(434)

    SYS_pidfd_send_signal ¶

    SYS_pidfd_send_signal :: uintptr(424)

    SYS_pipe ¶

    SYS_pipe :: uintptr(22)

    SYS_pipe2 ¶

    SYS_pipe2 :: uintptr(293)

    SYS_pivot_root ¶

    SYS_pivot_root :: uintptr(155)

    SYS_pkey_alloc ¶

    SYS_pkey_alloc :: uintptr(330)

    SYS_pkey_free ¶

    SYS_pkey_free :: uintptr(331)

    SYS_pkey_mprotect ¶

    SYS_pkey_mprotect :: uintptr(329)

    SYS_poll ¶

    SYS_poll :: uintptr(7)

    SYS_ppoll ¶

    SYS_ppoll :: uintptr(271)

    SYS_prctl ¶

    SYS_prctl :: uintptr(157)

    SYS_pread64 ¶

    SYS_pread64 :: uintptr(17)

    SYS_preadv ¶

    SYS_preadv :: uintptr(295)

    SYS_preadv2 ¶

    SYS_preadv2 :: uintptr(327)

    SYS_prlimit64 ¶

    SYS_prlimit64 :: uintptr(302)

    SYS_process_madvise ¶

    SYS_process_madvise :: uintptr(440)

    SYS_process_mrelease ¶

    SYS_process_mrelease :: uintptr(448)

    SYS_process_vm_readv ¶

    SYS_process_vm_readv :: uintptr(310)

    SYS_process_vm_writev ¶

    SYS_process_vm_writev :: uintptr(311)

    SYS_pselect6 ¶

    SYS_pselect6 :: uintptr(270)

    SYS_ptrace ¶

    SYS_ptrace :: uintptr(101)

    SYS_putpmsg ¶

    SYS_putpmsg :: uintptr(182)

    SYS_pwrite64 ¶

    SYS_pwrite64 :: uintptr(18)

    SYS_pwritev ¶

    SYS_pwritev :: uintptr(296)

    SYS_pwritev2 ¶

    SYS_pwritev2 :: uintptr(328)

    SYS_query_module ¶

    SYS_query_module :: uintptr(178)

    SYS_quotactl ¶

    SYS_quotactl :: uintptr(179)

    SYS_quotactl_fd ¶

    SYS_quotactl_fd :: uintptr(443)

    SYS_read ¶

    SYS_read :: uintptr(0)

    SYS_readahead ¶

    SYS_readahead :: uintptr(187)
    SYS_readlink :: uintptr(89)

    SYS_readlinkat ¶

    SYS_readlinkat :: uintptr(267)

    SYS_readv ¶

    SYS_readv :: uintptr(19)

    SYS_reboot ¶

    SYS_reboot :: uintptr(169)

    SYS_recvfrom ¶

    SYS_recvfrom :: uintptr(45)

    SYS_recvmmsg ¶

    SYS_recvmmsg :: uintptr(299)

    SYS_recvmsg ¶

    SYS_recvmsg :: uintptr(47)

    SYS_remap_file_pages ¶

    SYS_remap_file_pages :: uintptr(216)

    SYS_removexattr ¶

    SYS_removexattr :: uintptr(197)

    SYS_rename ¶

    SYS_rename :: uintptr(82)

    SYS_renameat ¶

    SYS_renameat :: uintptr(264)

    SYS_renameat2 ¶

    SYS_renameat2 :: uintptr(316)

    SYS_request_key ¶

    SYS_request_key :: uintptr(249)

    SYS_restart_syscall ¶

    SYS_restart_syscall :: uintptr(219)

    SYS_rmdir ¶

    SYS_rmdir :: uintptr(84)

    SYS_rseq ¶

    SYS_rseq :: uintptr(334)

    SYS_rt_sigaction ¶

    SYS_rt_sigaction :: uintptr(13)

    SYS_rt_sigpending ¶

    SYS_rt_sigpending :: uintptr(127)

    SYS_rt_sigprocmask ¶

    SYS_rt_sigprocmask :: uintptr(14)

    SYS_rt_sigqueueinfo ¶

    SYS_rt_sigqueueinfo :: uintptr(129)

    SYS_rt_sigreturn ¶

    SYS_rt_sigreturn :: uintptr(15)

    SYS_rt_sigsuspend ¶

    SYS_rt_sigsuspend :: uintptr(130)

    SYS_rt_sigtimedwait ¶

    SYS_rt_sigtimedwait :: uintptr(128)

    SYS_rt_tgsigqueueinfo ¶

    SYS_rt_tgsigqueueinfo :: uintptr(297)

    SYS_sched_get_priority_max ¶

    SYS_sched_get_priority_max :: uintptr(146)

    SYS_sched_get_priority_min ¶

    SYS_sched_get_priority_min :: uintptr(147)

    SYS_sched_getaffinity ¶

    SYS_sched_getaffinity :: uintptr(204)

    SYS_sched_getattr ¶

    SYS_sched_getattr :: uintptr(315)

    SYS_sched_getparam ¶

    SYS_sched_getparam :: uintptr(143)

    SYS_sched_getscheduler ¶

    SYS_sched_getscheduler :: uintptr(145)

    SYS_sched_rr_get_interval ¶

    SYS_sched_rr_get_interval :: uintptr(148)

    SYS_sched_setaffinity ¶

    SYS_sched_setaffinity :: uintptr(203)

    SYS_sched_setattr ¶

    SYS_sched_setattr :: uintptr(314)

    SYS_sched_setparam ¶

    SYS_sched_setparam :: uintptr(142)

    SYS_sched_setscheduler ¶

    SYS_sched_setscheduler :: uintptr(144)

    SYS_sched_yield ¶

    SYS_sched_yield :: uintptr(24)

    SYS_seccomp ¶

    SYS_seccomp :: uintptr(317)

    SYS_security ¶

    SYS_security :: uintptr(185)

    SYS_select ¶

    SYS_select :: uintptr(23)

    SYS_semctl ¶

    SYS_semctl :: uintptr(66)

    SYS_semget ¶

    SYS_semget :: uintptr(64)

    SYS_semop ¶

    SYS_semop :: uintptr(65)

    SYS_semtimedop ¶

    SYS_semtimedop :: uintptr(220)

    SYS_sendfile ¶

    SYS_sendfile :: uintptr(40)

    SYS_sendmmsg ¶

    SYS_sendmmsg :: uintptr(307)

    SYS_sendmsg ¶

    SYS_sendmsg :: uintptr(46)

    SYS_sendto ¶

    SYS_sendto :: uintptr(44)

    SYS_set_mempolicy ¶

    SYS_set_mempolicy :: uintptr(238)

    SYS_set_mempolicy_home_node ¶

    SYS_set_mempolicy_home_node :: uintptr(450)

    SYS_set_robust_list ¶

    SYS_set_robust_list :: uintptr(273)

    SYS_set_thread_area ¶

    SYS_set_thread_area :: uintptr(205)

    SYS_set_tid_address ¶

    SYS_set_tid_address :: uintptr(218)

    SYS_setdomainname ¶

    SYS_setdomainname :: uintptr(171)

    SYS_setfsgid ¶

    SYS_setfsgid :: uintptr(123)

    SYS_setfsuid ¶

    SYS_setfsuid :: uintptr(122)

    SYS_setgid ¶

    SYS_setgid :: uintptr(106)

    SYS_setgroups ¶

    SYS_setgroups :: uintptr(116)

    SYS_sethostname ¶

    SYS_sethostname :: uintptr(170)

    SYS_setitimer ¶

    SYS_setitimer :: uintptr(38)

    SYS_setns ¶

    SYS_setns :: uintptr(308)

    SYS_setpgid ¶

    SYS_setpgid :: uintptr(109)

    SYS_setpriority ¶

    SYS_setpriority :: uintptr(141)

    SYS_setregid ¶

    SYS_setregid :: uintptr(114)

    SYS_setresgid ¶

    SYS_setresgid :: uintptr(119)

    SYS_setresuid ¶

    SYS_setresuid :: uintptr(117)

    SYS_setreuid ¶

    SYS_setreuid :: uintptr(113)

    SYS_setrlimit ¶

    SYS_setrlimit :: uintptr(160)

    SYS_setsid ¶

    SYS_setsid :: uintptr(112)

    SYS_setsockopt ¶

    SYS_setsockopt :: uintptr(54)

    SYS_settimeofday ¶

    SYS_settimeofday :: uintptr(164)

    SYS_setuid ¶

    SYS_setuid :: uintptr(105)

    SYS_setxattr ¶

    SYS_setxattr :: uintptr(188)

    SYS_shmat ¶

    SYS_shmat :: uintptr(30)

    SYS_shmctl ¶

    SYS_shmctl :: uintptr(31)

    SYS_shmdt ¶

    SYS_shmdt :: uintptr(67)

    SYS_shmget ¶

    SYS_shmget :: uintptr(29)

    SYS_shutdown ¶

    SYS_shutdown :: uintptr(48)

    SYS_sigaltstack ¶

    SYS_sigaltstack :: uintptr(131)

    SYS_signalfd ¶

    SYS_signalfd :: uintptr(282)

    SYS_signalfd4 ¶

    SYS_signalfd4 :: uintptr(289)

    SYS_socket ¶

    SYS_socket :: uintptr(41)

    SYS_socketpair ¶

    SYS_socketpair :: uintptr(53)

    SYS_splice ¶

    SYS_splice :: uintptr(275)

    SYS_stat ¶

    SYS_stat :: uintptr(4)

    SYS_statfs ¶

    SYS_statfs :: uintptr(137)

    SYS_statx ¶

    SYS_statx :: uintptr(332)

    SYS_swapoff ¶

    SYS_swapoff :: uintptr(168)

    SYS_swapon ¶

    SYS_swapon :: uintptr(167)
    SYS_symlink :: uintptr(88)

    SYS_symlinkat ¶

    SYS_symlinkat :: uintptr(266)

    SYS_sync ¶

    SYS_sync :: uintptr(162)

    SYS_sync_file_range ¶

    SYS_sync_file_range :: uintptr(277)

    SYS_syncfs ¶

    SYS_syncfs :: uintptr(306)

    SYS_sysfs ¶

    SYS_sysfs :: uintptr(139)

    SYS_sysinfo ¶

    SYS_sysinfo :: uintptr(99)

    SYS_syslog ¶

    SYS_syslog :: uintptr(103)

    SYS_tee ¶

    SYS_tee :: uintptr(276)

    SYS_tgkill ¶

    SYS_tgkill :: uintptr(234)

    SYS_time ¶

    SYS_time :: uintptr(201)

    SYS_timer_create ¶

    SYS_timer_create :: uintptr(222)

    SYS_timer_delete ¶

    SYS_timer_delete :: uintptr(226)

    SYS_timer_getoverrun ¶

    SYS_timer_getoverrun :: uintptr(225)

    SYS_timer_gettime ¶

    SYS_timer_gettime :: uintptr(224)

    SYS_timer_settime ¶

    SYS_timer_settime :: uintptr(223)

    SYS_timerfd_create ¶

    SYS_timerfd_create :: uintptr(283)

    SYS_timerfd_gettime ¶

    SYS_timerfd_gettime :: uintptr(287)

    SYS_timerfd_settime ¶

    SYS_timerfd_settime :: uintptr(286)

    SYS_times ¶

    SYS_times :: uintptr(100)

    SYS_tkill ¶

    SYS_tkill :: uintptr(200)

    SYS_truncate ¶

    SYS_truncate :: uintptr(76)

    SYS_tuxcall ¶

    SYS_tuxcall :: uintptr(184)

    SYS_umask ¶

    SYS_umask :: uintptr(95)

    SYS_umount2 ¶

    SYS_umount2 :: uintptr(166)

    SYS_uname ¶

    SYS_uname :: uintptr(63)
    SYS_unlink :: uintptr(87)

    SYS_unlinkat ¶

    SYS_unlinkat :: uintptr(263)

    SYS_unshare ¶

    SYS_unshare :: uintptr(272)

    SYS_uselib ¶

    SYS_uselib :: uintptr(134)

    SYS_userfaultfd ¶

    SYS_userfaultfd :: uintptr(323)

    SYS_ustat ¶

    SYS_ustat :: uintptr(136)

    SYS_utime ¶

    SYS_utime :: uintptr(132)

    SYS_utimensat ¶

    SYS_utimensat :: uintptr(280)

    SYS_utimes ¶

    SYS_utimes :: uintptr(235)

    SYS_vfork ¶

    SYS_vfork :: uintptr(58)

    SYS_vhangup ¶

    SYS_vhangup :: uintptr(153)

    SYS_vmsplice ¶

    SYS_vmsplice :: uintptr(278)

    SYS_vserver ¶

    SYS_vserver :: uintptr(236)

    SYS_wait4 ¶

    SYS_wait4 :: uintptr(61)

    SYS_waitid ¶

    SYS_waitid :: uintptr(247)

    SYS_write ¶

    SYS_write :: uintptr(1)

    SYS_writev ¶

    SYS_writev :: uintptr(20)

    S_IFBLK ¶

    S_IFBLK: bit_set[Mode_Bits; u32] : Mode{.IFDIR, .IFCHR}

    S_IFCHR ¶

    S_IFCHR: bit_set[Mode_Bits; u32] : Mode{.IFCHR}

    S_IFDIR ¶

    S_IFDIR: bit_set[Mode_Bits; u32] : Mode{.IFDIR}

    S_IFIFO ¶

    S_IFIFO: bit_set[Mode_Bits; u32] : Mode{.IFIFO}

    S_IFLNK ¶

    S_IFLNK: bit_set[Mode_Bits; u32] : Mode{.IFREG, .IFCHR}

    S_IFMT ¶

    S_IFMT: bit_set[Mode_Bits; u32] : Mode{.IFREG, .IFDIR, .IFCHR, .IFIFO}

    S_IFREG ¶

    S_IFREG: bit_set[Mode_Bits; u32] : Mode{.IFREG}

    S_IFSOCK ¶

    S_IFSOCK: bit_set[Mode_Bits; u32] : Mode{.IFREG, .IFDIR}

    UNAME26 ¶

    UNAME26 :: 17
     

    Bits for Personality_Flags

    UTIME_NOW ¶

    UTIME_NOW :: uint((1 << 30) - 1)
     

    Special value to put into timespec for utimensat() to set timestamp to the current time.

    UTIME_OMIT ¶

    UTIME_OMIT :: uint((1 << 30) - 2)
     

    Special value to put into the timespec for utimensat() to leave the corresponding field of the timestamp unchanged.

    WAIT_ANY ¶

    WAIT_ANY :: Pid(-1)
     

    For wait4: Pass this pid to wait for any process.

    WAIT_MYPGRP ¶

    WAIT_MYPGRP :: Pid(0)
     

    For wait4: Pass this pid to wait for any process in current process group.

    WHOLE_SECONDS ¶

    WHOLE_SECONDS :: 25

    W_OK ¶

    W_OK: bit_set[Mode_Bits; u32] : Mode{.IWOTH}
     

    For access.2 syscall family: instruct to check if the file is writeable.

    X_OK ¶

    X_OK: bit_set[Mode_Bits; u32] : Mode{.IXOTH}
     

    For access.2 syscall family: instruct to check if the file is executable.

    Variables

    This section is empty.

    Procedures

    S_ISBLK ¶

    S_ISBLK :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Check the Mode bits to see if the file is a block device.

    S_ISCHR ¶

    S_ISCHR :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Check the Mode bits to see if the file is a character device.

    S_ISDIR ¶

    S_ISDIR :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Check the Mode bits to see if the file is a directory.

    S_ISFIFO ¶

    S_ISFIFO :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Checks the Mode bits to see if the file is a named pipe (FIFO).

    S_ISLNK ¶

    S_ISLNK :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Check the Mode bits to see if the file is a symlink.

    S_ISREG ¶

    S_ISREG :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Check the Mode bits to see if the file is a register.

    S_ISSOCK ¶

    S_ISSOCK :: proc "contextless" (m: bit_set[Mode_Bits; u32]) -> bool {…}
     

    Check the Mode bits to see if the file is a socket.

    WCOREDUMP ¶

    WCOREDUMP :: proc "contextless" (s: u32) -> bool {…}
     

    / Check if the process dumped core

    WEXITSTATUS ¶

    WEXITSTATUS :: proc "contextless" (s: u32) -> u32 {…}
     

    / Low 8 bits of the exit code / Only retrieve the exit code if WIFEXITED(s) = true

    WIFCONTINUED ¶

    WIFCONTINUED :: proc "contextless" (s: u32) -> bool {…}
     

    / Check if the process is continued by the tracee

    WIFEXITED ¶

    WIFEXITED :: proc "contextless" (s: u32) -> bool {…}
     

    / Check if the process terminated normally (via exit.2)

    WIFSIGNALED ¶

    WIFSIGNALED :: proc "contextless" (s: u32) -> bool {…}
     

    / Check if the process signaled

    WIFSTOPPED ¶

    WIFSTOPPED :: proc "contextless" (s: u32) -> bool {…}
     

    / Check if the process has stopped

    WSTOPSIG ¶

    WSTOPSIG :: proc "contextless" (s: u32) -> u32 {…}
     

    / The signal that stopped the child / Only retrieve if WIFSTOPPED(s) = true

    WTERMSIG ¶

    WTERMSIG :: proc "contextless" (s: u32) -> u32 {…}
     

    / Termination signal / Only retrieve the code if WIFSIGNALED(s) = true

    accept ¶

    accept :: proc "contextless" (sock: Fd, addr: ^$, sockflags: bit_set[Socket_FD_Flags_Bits; int] = {}) -> (Fd, Errno) {…}
     

    Accept a pending connection or block until new connection appears. Depends on Sock_FD_Flags of the sock parameter. Available since Linux 2.0.

    access ¶

    access :: proc "contextless" (name: cstring, mode: bit_set[Mode_Bits; u32] = F_OK) -> Errno {…}
     

    Check user permissions for a file. If Mode is F_OK, checks whether the file exists. Similarly, X_OK, W_OK, R_OK check if the file is executable, writeable, readable respectively. Available since Linux 1.0. For ARM64 available since Linux 2.6.16.

    alarm ¶

    alarm :: proc "contextless" (seconds: u32) -> u32 {…}
     

    Set an alarm clock for delivery of a signal. Available since Linux 1.0.

    bind ¶

    bind :: proc "contextless" (sock: Fd, addr: ^$) -> Errno {…}
     

    Bind a socket to the given local address. Available since Linux 2.0.

    brk ¶

    brk :: proc "contextless" (addr: uintptr) -> Errno {…}
     

    Extend the data segment size until the address addr. Note: you may be familiar with sbrk(), which is not actually a syscall, so is not implemented here. Available since Linux 1.0.

    chdir ¶

    chdir :: proc "contextless" (path: cstring) -> Errno {…}
     

    Change working directory to the directory specified by path. Available since Linux 1.0.

    chmod ¶

    chmod :: proc "contextless" (name: cstring, mode: bit_set[Mode_Bits; u32] = F_OK) -> Errno {…}
     

    Change file permissions. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    chown ¶

    chown :: proc "contextless" (name: cstring, uid: Uid, gid: Gid) -> Errno {…}
     

    Change ownership of a file. Available since Linux 2.2. On 32-bit architectures available since Linux 2.4. On ARM64 available since Linux 2.6.16.

    clock_getres ¶

    clock_getres :: proc "contextless" (clock: Clock_Id) -> (res: Time_Spec, err: Errno) {…}
     

    Finds the resolution of the specified clock. Available since Linux 2.6.

    clock_gettime ¶

    clock_gettime :: proc "contextless" (clock: Clock_Id) -> (ts: Time_Spec, err: Errno) {…}
     

    Retrieve the time of the specified clock. Available since Linux 2.6.

    clock_nanosleep ¶

    clock_nanosleep :: proc "contextless" (clock: Clock_Id, flags: bit_set[ITimer_Flags_Bits; u32], request: ^Time_Spec, remain: ^Time_Spec) -> Errno {…}
     

    Sleep for an interval specified with nanosecond precision. Available since Linux 2.6.

    clock_settime ¶

    clock_settime :: proc "contextless" (clock: Clock_Id, ts: ^Time_Spec) -> Errno {…}
     

    Set the time of the specified clock. Available since Linux 2.6.

    close ¶

    close :: proc "contextless" (fd: Fd) -> Errno {…}
     

    Close the file. Available since Linux 1.0.

    close_range ¶

    close_range :: proc "contextless" (lo: Fd, hi: Fd, flags: bit_set[Close_Range_Flags_Bits; u32]) -> Errno {…}
     

    Close the range of files as an atomic operation. The range of file descriptors is inclusive, and may contain invalid file descriptors. Available since Linux 5.9.

    connect ¶

    connect :: proc "contextless" (sock: Fd, addr: ^$) -> Errno {…}
     

    Connect the socket to the address. Available since Linux 2.0.

    creat ¶

    creat :: proc "contextless" (name: cstring, mode: bit_set[Mode_Bits; u32] = F_OK) -> (Fd, Errno) {…}
     

    Create a file. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    dirent_iterate_buf ¶

    dirent_iterate_buf :: proc "contextless" (buf: []u8, offs: ^int) -> (d: ^Dirent, cont: bool) {…}
     

    / Iterate the results of getdents / Only iterates as much data as loaded in the buffer / In case you need to iterate all files in a directory / consider using dirent_get_iterate / / Example of using dirent_iterate_buf / // Get dirents into a buffer / buf: [128]u8 / sys.getdents(dirfd, buf[:]) / // Print the names of the files / for dir in sys.dirent_iterate_buf(buf[:], &offs) { / name := sys.dirent_name(dir) / fmt.println(name) / } / This function doesn't automatically make a request / for the buffer to be refilled

    dirent_name ¶

    dirent_name :: proc "contextless" (dirent: ^Dirent) -> string {…}
     

    / Obtain the name of dirent as a string / The lifetime of the string is bound to the lifetime of the provided dirent structure

    dup ¶

    dup :: proc "contextless" (fd: Fd) -> (Fd, Errno) {…}
     

    Allocate a new file descriptor that refers to the same file as the one provided. Available since Linux 1.0.

    dup2 ¶

    dup2 :: proc "contextless" (old: Fd, new: Fd) -> (Fd, Errno) {…}
     

    Adjust an existing file descriptor to point to the same file as old. Available since Linux 1.0. On ARM64 available since Linux 2.6.27.

    dup3 ¶

    dup3 :: proc "contextless" (old: Fd, new: Fd, flags: bit_set[Open_Flags_Bits; u32]) -> (Fd, Errno) {…}
     

    Adjust an existing file descriptor to point to the same file as old. In addition to dup2 allows to pass O_CLOEXEC flag. Available since Linux 2.6.27.

    epoll_create ¶

    epoll_create :: proc(size: i32 = 1) -> (Fd, Errno) {…}
     

    Open an epoll file descriptor.

    The size argument is ignored but must be greater than zero.

    Available since Linux 2.6.

    epoll_create1 ¶

    epoll_create1 :: proc(flags: bit_set[EPoll_Flags_Bits; i32]) -> (Fd, Errno) {…}

    epoll_ctl ¶

    epoll_ctl :: proc(epfd: Fd, op: EPoll_Ctl_Opcode, fd: Fd, event: ^EPoll_Event) -> Errno {…}
     

    Control interface for an epoll file descriptor. Available since Linux 2.6.

    epoll_pwait ¶

    epoll_pwait :: proc(epfd: Fd, events: [^]EPoll_Event, count: i32, timeout: i32, sigmask: ^[1]uint) -> (i32, Errno) {…}
     

    Wait for an I/O event on an epoll file descriptor. Available since Linux 2.6.

    epoll_pwait2 ¶

    epoll_pwait2 :: proc(epfd: Fd, events: [^]EPoll_Event, count: i32, timeout: ^Time_Spec, sigmask: ^[1]uint) -> (i32, Errno) {…}
     

    Wait for an I/O event on an epoll file descriptor. Available since Linux 2.6.

    epoll_wait ¶

    epoll_wait :: proc(epfd: Fd, events: [^]EPoll_Event, count: i32, timeout: i32) -> (i32, Errno) {…}
     

    Wait for an I/O event on an epoll file descriptor.

    timeout is specified in milliseconds.

    Available since Linux 2.6.

    execve ¶

    execve :: proc "contextless" (name: cstring, argv: [^]cstring, envp: [^]cstring) -> Errno {…}
     

    Replace the current process with another program. Available since Linux 1.0. On ARM64 available since Linux 3.19.

    execveat ¶

    execveat :: proc "contextless" (dirfd: Fd, name: cstring, argv: [^]cstring, envp: [^]cstring, flags: bit_set[Execveat_Flags_Bits; i32] = {}) -> Errno {…}
     

    Execute program relative to a directory file descriptor. Available since Linux 3.19.

    exit ¶

    exit :: proc "contextless" (code: i32) -> ! {…}
     

    Exit the thread with a given exit code. Available since Linux 1.0.

    exit_group ¶

    exit_group :: proc "contextless" (code: i32) -> ! {…}
     

    Exit the thread group. Available since Linux 2.6.

    faccessat ¶

    faccessat :: proc "contextless" (dirfd: Fd, name: cstring, mode: bit_set[Mode_Bits; u32]) -> Errno {…}
     

    Checks the user permissions for a file at specified dirfd. Available since Linux 2.6.16.

    faccessat2 ¶

    faccessat2 :: proc "contextless" (dirfd: Fd, name: cstring, mode: bit_set[Mode_Bits; u32], flags: bit_set[FD_Flags_Bits; i32]) -> Errno {…}
     

    Checks the user permissions for a file at specified dirfd (with flags). Available since Linux 5.8.

    fchdir ¶

    fchdir :: proc "contextless" (fd: Fd) -> Errno {…}
     

    Change working directory to the directory specified by dirfd. Available since Linux 1.0.

    fchmod ¶

    fchmod :: proc "contextless" (fd: Fd, mode: bit_set[Mode_Bits; u32]) -> Errno {…}
     

    Change file permissions through a file descriptor. Available since Linux 1.0.

    fchmodat ¶

    fchmodat :: proc "contextless" (dirfd: Fd, name: cstring, mode: bit_set[Mode_Bits; u32], flags: bit_set[FD_Flags_Bits; i32]) -> Errno {…}
     

    Change the file mode at a specified file descriptor. Available since Linux 2.6.16.

    fchown ¶

    fchown :: proc "contextless" (fd: Fd, uid: Uid, gid: Gid) -> Errno {…}
     

    Change ownership of a file by file descriptor. Available since Linux 1.0. On 32-bit architecvtures available since Linux 2.4.

    fchownat ¶

    fchownat :: proc "contextless" (dirfd: Fd, name: cstring, uid: Uid, gid: Gid) -> Errno {…}
     

    Change the ownership of the file specified relative to directory. Available since Linux 2.6.16.

    fcntl_add_seals ¶

    fcntl_add_seals :: proc "contextless" (fd: Fd, cmd: FCntl_Command_ADD_SEALS, seal: bit_set[Seal_Bits; i32]) -> Errno {…}

    fcntl_dupfd ¶

    fcntl_dupfd :: proc "contextless" (fd: Fd, cmd: FCntl_Command_DUPFD, newfd: Fd) -> (Fd, Errno) {…}

    fcntl_dupfd_cloexec ¶

    fcntl_dupfd_cloexec :: proc "contextless" (fd: Fd, cmd: FCntl_Command_DUPFD_CLOEXEC, newfd: Fd) -> (Fd, Errno) {…}

    fcntl_get_file_rw_hint ¶

    fcntl_get_file_rw_hint :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GET_FILE_RW_HINT, hint: ^RW_Hint) -> Errno {…}

    fcntl_get_rw_hint ¶

    fcntl_get_rw_hint :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GET_RW_HINT, hint: ^RW_Hint) -> Errno {…}

    fcntl_get_seals ¶

    fcntl_get_seals :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GET_SEALS) -> (bit_set[Seal_Bits; i32], Errno) {…}

    fcntl_getfd ¶

    fcntl_getfd :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETFD) -> (Fd, Errno) {…}

    fcntl_getfl ¶

    fcntl_getfl :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETFL) -> (bit_set[Open_Flags_Bits; u32], Errno) {…}

    fcntl_getlease ¶

    fcntl_getlease :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETLEASE) -> (FD_Lease, Errno) {…}

    fcntl_getlk ¶

    fcntl_getlk :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETLK, lock: ^FLock) -> Errno {…}

    fcntl_getown_ex ¶

    fcntl_getown_ex :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETOWN_EX, owner: ^F_Owner) -> Errno {…}

    fcntl_getpipe_sz ¶

    fcntl_getpipe_sz :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETPIPE_SZ) -> (i32, Errno) {…}

    fcntl_getsig ¶

    fcntl_getsig :: proc "contextless" (fd: Fd, cmd: FCntl_Command_GETSIG) -> (Signal, Errno) {…}

    fcntl_notify ¶

    fcntl_notify :: proc "contextless" (fd: Fd, cmd: FCntl_Command_NOTIFY, notifications: bit_set[FD_Notifications_Bits; i32]) -> Errno {…}

    fcntl_set_file_rw_hint ¶

    fcntl_set_file_rw_hint :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SET_FILE_RW_HINT, hint: ^RW_Hint) -> Errno {…}

    fcntl_set_rw_hint ¶

    fcntl_set_rw_hint :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SET_RW_HINT, hint: ^RW_Hint) -> Errno {…}

    fcntl_setfd ¶

    fcntl_setfd :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETFD, newfd: Fd) -> Errno {…}

    fcntl_setfl ¶

    fcntl_setfl :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETFL, flags: bit_set[Open_Flags_Bits; u32]) -> Errno {…}

    fcntl_setlease ¶

    fcntl_setlease :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETLEASE, lease: FD_Lease) -> Errno {…}

    fcntl_setlk ¶

    fcntl_setlk :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETLK, lock: ^FLock) -> Errno {…}

    fcntl_setlkw ¶

    fcntl_setlkw :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETLKW, lock: ^FLock) -> Errno {…}

    fcntl_setown_ex ¶

    fcntl_setown_ex :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETOWN_EX, owner: ^F_Owner) -> Errno {…}

    fcntl_setpipe_sz ¶

    fcntl_setpipe_sz :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETPIPE_SZ, sz: i32) -> (i32, Errno) {…}

    fcntl_setsig ¶

    fcntl_setsig :: proc "contextless" (fd: Fd, cmd: FCntl_Command_SETSIG, sig: Signal) -> Errno {…}

    fdatasync ¶

    fdatasync :: proc "contextless" (fd: Fd) -> Errno {…}
     

    Synchronize the state of the file with the storage device. Similar to fsync, except does not flush the metadata. Available since Linux 2.0.

    flock ¶

    flock :: proc "contextless" (fd: Fd, operation: bit_set[FLock_Op_Bits; i32]) -> Errno {…}
     

    Apply or remove advisory lock on an open file. Available since Linux 2.0.

    fork ¶

    fork :: proc "contextless" () -> (Pid, Errno) {…}
     

    Creates a copy of the running process. Available since Linux 1.0.

    fstat ¶

    fstat :: proc "contextless" (fd: Fd, stat: ^Stat) -> Errno {…}
     

    Get file status from file descriptor.

    Returns information about the file in struct pointed to by stat parameter.

    Available since Linux 1.0. For 32-bit systems a different syscall is used that became available since 2.4.

    fstatat ¶

    fstatat :: proc "contextless" (dirfd: Fd, name: cstring, stat: ^Stat, flags: bit_set[FD_Flags_Bits; i32]) -> Errno {…}
     

    Get information about a file at a specific directory. Available since Linux 2.6.16.

    fstatfs ¶

    fstatfs :: proc "contextless" (fd: Fd, statfs: ^Stat_FS) -> Errno {…}
     

    Query information about filesystem by file descriptor.

    Available since Linux 1.0. For 32-bit systems a different syscall is used that became available since 2.6.

    fsync ¶

    fsync :: proc "contextless" (fd: Fd) -> Errno {…}
     

    Sync state of the file with the storage device. Available since Linux 1.0.

    ftruncate ¶

    ftruncate :: proc "contextless" (fd: Fd, length: i64) -> Errno {…}
     

    Truncate a file specified by file descriptor to specified length. On 32-bit architectures available since 2.4.

    futex_cmp_requeue ¶

    futex_cmp_requeue :: proc "contextless" (
    	futex:             ^u32, 
    	op:                Futex_Cmp_Requeue_Type, 
    	flags:             bit_set[Futex_Flags_Bits; u32], 
    	requeue_threshold: u32, 
    	requeue_max:       i32, 
    	requeue_futex:     ^u32, 
    	val:               i32, 
    ) -> (int, Errno) {…}
     

    Requeues processes waiting on futex futex to wait on futex requeue_futex requeue_threshold specifies the maximum amount of waiters to wake up, the rest of the waiters will be requeued requeue_max specifies the maximum amount of waiters that are required at requeue_futex The operation blocks until the requeue_max requirement is satisfied If the value of the mutex is not equal to val, fails with EAGAIN before any further checks Returns the total number of waiters that have been woken up plus the number of waiters requeued.

    futex_op ¶

    futex_op :: proc "contextless" (arg_op: Futex_Arg_Op, cmp_op: Futex_Cmp_Op, op_arg: u32, cmp_arg: u32) -> u32 {…}
     

    / Constructor for the futex_op argument of a FUTEX_WAKE_OP call

    futex_requeue ¶

    futex_requeue :: proc "contextless" (
    	futex:             ^u32, 
    	op:                Futex_Requeue_Type, 
    	flags:             bit_set[Futex_Flags_Bits; u32], 
    	requeue_threshold: u32, 
    	requeue_max:       i32, 
    	requeue_futex:     ^u32, 
    ) -> (int, Errno) {…}
     

    See futex_cmp_requeue, this function does the same thing but doesn't check the value of the futex. Returns the total number of waiters that have been woken up.

    futex_wait ¶

    futex_wait :: proc "contextless" (futex: ^u32, op: Futex_Wait_Type, flags: bit_set[Futex_Flags_Bits; u32], val: u32, timeout: ^Time_Spec = nil) -> Errno {…}
     

    Wait on a futex until it's signaled.

    futex_wait_bitset ¶

    futex_wait_bitset :: proc "contextless" (
    	futex:   ^u32, 
    	op:      Futex_Wait_Bitset_Type, 
    	flags:   bit_set[Futex_Flags_Bits; u32], 
    	val:     u32, 
    	timeout: ^Time_Spec, 
    	mask:    u32, 
    ) -> (int, Errno) {…}
     

    Same as wait, but mask specifies bits that must be equal for the mutex to wake up.

    futex_wake ¶

    futex_wake :: proc "contextless" (futex: ^u32, op: Futex_Wake_Type, flags: bit_set[Futex_Flags_Bits; u32], n_wakeup: i32) -> (int, Errno) {…}
     

    Wake up other threads on a futex n_wakeup specifies the number of processes to wakeup. Specify max(i32) to wake up all processes waiting

    futex_wake_bitset ¶

    futex_wake_bitset :: proc "contextless" (futex: ^u32, op: Futex_Wake_Bitset_Type, flags: bit_set[Futex_Flags_Bits; u32], n_wakeup: u32, mask: u32) -> (int, Errno) {…}
     

    Wake up on bitset.

    futex_wake_op ¶

    futex_wake_op :: proc "contextless" (
    	futex:           ^u32, 
    	op:              Futex_Wake_Op_Type, 
    	flags:           bit_set[Futex_Flags_Bits; u32], 
    	wakeup:          i32, 
    	dst_wakeup, dst: ^u32, 
    	futex_op:        u32, 
    ) -> (int, Errno) {…}
     

    Okay, for this one, see the man pages, the description for it is pretty long and very specific. It's sole. purpose is to allow implementing conditional values sync primitive, it seems like.

    getcwd ¶

    getcwd :: proc "contextless" (buf: []u8) -> (int, Errno) {…}
     

    Get current working directory. Available since Linux 1.0.

    getdents ¶

    getdents :: proc "contextless" (dirfd: Fd, buf: []u8) -> (int, Errno) {…}
     

    Retrieve the contents of the directory specified by dirfd. Returns the number of bytes written. Available since Linux 2.4.

    getegid ¶

    getegid :: proc "contextless" () -> Gid {…}
     

    Get effective group ID. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    geteuid ¶

    geteuid :: proc "contextless" () -> Uid {…}
     

    Get effective user ID. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    getgid ¶

    getgid :: proc "contextless" () -> Gid {…}
     

    Get real group ID. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    getgroups ¶

    getgroups :: proc "contextless" (gids: []Gid) -> (int, Errno) {…}
     

    Get supplementary group IDs. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    getitimer ¶

    getitimer :: proc "contextless" (which: ITimer_Which, cur: ^ITimer_Val) -> Errno {…}
     

    Get the value of an internal timer. Available since Linux 1.0.

    getpeername ¶

    getpeername :: proc "contextless" (sock: Fd, addr: ^Sock_Addr_Any) -> Errno {…}
     

    Get the name of the connected peer socket. Available since Linux 2.0.

    getpgid ¶

    getpgid :: proc "contextless" (pid: Pid) -> (Pid, Errno) {…}
     

    Get process group. Available since Linux 1.0.

    getpgrp ¶

    getpgrp :: proc "contextless" () -> (Pid, Errno) {…}
     

    Get process group. Available since Linux 1.0.

    getpid ¶

    getpid :: proc "contextless" () -> Pid {…}
     

    Returns the thread group ID of the current process. Note that it doesn't return the pid, despite it's name. Available since Linux 1.0.

    getppid ¶

    getppid :: proc "contextless" () -> Pid {…}
     

    Get the parent process ID. Available since Linux 1.0.

    getpriority ¶

    getpriority :: proc "contextless" (which: Priority_Which, who: i32) -> (i32, Errno) {…}
     

    Get priority on user, process group or process. Available since Linux 1.0.

    getrandom ¶

    getrandom :: proc "contextless" (buf: []u8, flags: bit_set[Get_Random_Flags_Bits; i32]) -> (int, Errno) {…}

    getresgid ¶

    getresgid :: proc "contextless" (real: ^Gid, effective: ^Gid, saved: ^Gid) -> Errno {…}
     

    Get real, effective and saved group id. Available since Linux 2.2. On 32-bit platforms available since Linux 2.4.

    getresuid ¶

    getresuid :: proc "contextless" (real: ^Uid, effective: ^Uid, saved: ^Uid) -> Errno {…}
     

    Get real, effective and saved user id. Available since Linux 2.2. On 32-bit platforms available since Linux 2.4.

    getrlimit ¶

    getrlimit :: proc "contextless" (kind: RLimit_Kind, resource: ^RLimit) -> Errno {…}
     

    Get limits on resources. Available since Linux 1.0.

    getrusage ¶

    getrusage :: proc "contextless" (who: RUsage_Who, rusage: ^RUsage) -> Errno {…}
     

    Get resource usage. Available since Linux 1.0.

    getsid ¶

    getsid :: proc "contextless" (pid: Pid) -> (Pid, Errno) {…}
     

    Get session ID of the calling process. Available since Linux 2.0.

    getsockname ¶

    getsockname :: proc "contextless" (sock: Fd, addr: ^Sock_Addr_Any) -> Errno {…}
     

    Get socket name (aka it's bound address). Available since Linux 2.0.

    getsockopt_base ¶

    getsockopt_base :: proc "contextless" (sock: Fd, level: int, opt: Socket_Option, val: $) -> (int, Errno) {…}

    getsockopt_sock ¶

    getsockopt_sock :: proc "contextless" (sock: Fd, level: Socket_API_Level_Sock, opt: Socket_Option, val: ^$) -> (int, Errno) {…}

    getsockopt_tcp ¶

    getsockopt_tcp :: proc "contextless" (sock: Fd, level: Socket_API_Level_TCP, opt: Socket_TCP_Option, val: ^$) -> (int, Errno) {…}

    getsockopt_udp ¶

    getsockopt_udp :: proc "contextless" (sock: Fd, level: Socket_API_Level_UDP, opt: Socket_UDP_Option, val: ^$) -> (int, Errno) {…}

    gettid ¶

    gettid :: proc "contextless" () -> Pid {…}
     

    Returns the thread ID of the current process This is what the kernel calls "pid". Let me insert a tiny rant here, this terminology is confusing: sometimes pid refers to a thread, and other times it refers to a thread group (process group?) Anyway, this syscall is available since Linux 1.0

    gettimeofday ¶

    gettimeofday :: proc "contextless" (tv: ^Time_Val) -> Errno {…}
     

    Get current time. Available since Linux 1.0.

    getuid ¶

    getuid :: proc "contextless" () -> Uid {…}
     

    Get real user ID. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    ioctl ¶

    ioctl :: proc "contextless" (fd: Fd, request: u32, arg: uintptr) -> uintptr {…}
     

    Control devices. The ioctl syscall is a bit special because its argument is usually a pointer to some driver-specific structure. The request value is device-specific. Consult your LibC implementation's ioctls.h file to learn more. The returned value of ioctl may be an error code value instead of a memory address depending on the request type. Available since Linux 1.0.

    kill ¶

    kill :: proc "contextless" (pid: Pid, signal: Signal) -> Errno {…}
     

    Send signal to a process. Available since Linux 1.0.

    lchown ¶

    lchown :: proc "contextless" (name: cstring, uid: Uid, gid: Gid) -> Errno {…}
     

    Change ownership of a file. Unlike chown, if a file is a symlink dooesn't dereference it. Available since Linux 1.0. On 32-bit architectures available since Linux 2.4. On ARM64 available since Linux 2.6.16.

    link :: proc "contextless" (target: cstring, linkpath: cstring) -> Errno {…}
     

    Create a hard link on a file. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    linkat ¶

    linkat :: proc "contextless" (target_dirfd: Fd, oldpath: cstring, link_dirfd: Fd, link: cstring, flags: bit_set[FD_Flags_Bits; i32]) -> Errno {…}
     

    Creates a hard link on a file relative to specified dirfd. Available since Linux 2.6.16.

    listen ¶

    listen :: proc "contextless" (sock: Fd, queue_len: i32) -> Errno {…}
     

    Marks the socket as a socket that listen to connections using accept(2). Available since Linux 2.0.

    lseek ¶

    lseek :: proc "contextless" (fd: Fd, off: i64, whence: Seek_Whence) -> (i64, Errno) {…}
     

    Seek the file stream to specified offset. Available since Linux 1.0. On 32-bit platforms available since Linux 1.2.

    lstat ¶

    lstat :: proc "contextless" (filename: cstring, stat: ^Stat) -> Errno {…}
     

    Get information about the file that's potentially a symbolic link The information is returned in a struct pointed to by stat parameter. The difference with stat, fstat is that if the file is a symbolic link, stat and fstat will dereference the link. lstat doesn't dereference symlinks.

    Available since Linux 1.0. For 32-bit systems a different syscall is used that became available since 2.4. Not available on arm64.

    madvise ¶

    madvise :: proc "contextless" (addr: rawptr, size: uint, advice: MAdvice) -> Errno {…}
     

    Give advice about use of memory. Available since Linux 2.4.

    mincore ¶

    mincore :: proc "contextless" (addr: rawptr, size: uint, vec: []b8) -> Errno {…}
     

    Determine if pages are resident in memory. Available since Linux 2.4.

    mkdir ¶

    mkdir :: proc "contextless" (name: cstring, mode: bit_set[Mode_Bits; u32] = F_OK) -> Errno {…}
     

    Creates a directory. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    mkdirat ¶

    mkdirat :: proc "contextless" (dirfd: Fd, name: cstring, mode: bit_set[Mode_Bits; u32]) -> Errno {…}
     

    Create a directory relative to specified dirfd. Available since Linux 2.6.16.

    mknod ¶

    mknod :: proc "contextless" (name: cstring, mode: bit_set[Mode_Bits; u32], dev: Dev) -> Errno {…}
     

    Create a special or ordinary file.

    mode parameter contains both the the file mode and the type of the node to create. -> Add one of S_IFSOCK, S_IFBLK, S_IFFIFO, S_IFCHR to mode.

    Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    mknodat ¶

    mknodat :: proc "contextless" (dirfd: Fd, name: cstring, mode: bit_set[Mode_Bits; u32], dev: Dev) -> Errno {…}
     

    Create a special or ordinary file wrt given directory specified by dirfd. Available since Linux 2.6.16.

    mlock ¶

    mlock :: proc "contextless" (addr: rawptr, size: uint, flags: bit_set[MLock_Flags_Bits; u32] = {}) -> Errno {…}
     

    Lock and memory. Available since Linux 2.0. If flags specified, available since Linux 4.4.

    mlockall ¶

    mlockall :: proc "contextless" (flags: bit_set[MLock_Flags_Bits; u32] = {}) -> Errno {…}
     

    Lock all memory. Available since Linux 2.0.

    mmap ¶

    mmap :: proc "contextless" (
    	addr:   uintptr, 
    	size:   uint, 
    	prot:   bit_set[Mem_Protection_Bits; i32], 
    	flags:  bit_set[Map_Flags_Bits; i32], 
    	fd:     Fd = Fd(-1), 
    	offset: i64 = 0, 
    ) -> (rawptr, Errno) {…}
     

    Map files into memory. Available since Linux 1.0. On 32-bit platforms since Linux 1.0.

    mprotect ¶

    mprotect :: proc "contextless" (addr: rawptr, size: uint, prot: bit_set[Mem_Protection_Bits; i32]) -> Errno {…}
     

    Protect memory region. Available since Linux 1.0.

    mremap ¶

    mremap :: proc "contextless" (old_addr: rawptr, old_size: uint, new_size: uint, flags: bit_set[MRemap_Flags_Bits; i32], new_addr: uintptr = 0) -> (rawptr, Errno) {…}
     

    Remap a virtual memory address. Available since Linux 2.0.

    msgctl ¶

    msgctl :: proc "contextless" (key: Key, cmd: IPC_Cmd, buf: ^Msqid_DS) -> (int, Errno) {…}
     

    SystemV message control operations. Available since Linux 2.0.

    msgget ¶

    msgget :: proc "contextless" (key: Key, flags: bit_set[IPC_Flags_Bits; i16]) -> (Key, Errno) {…}
     

    Get SystemV message queue identifier. Available since Linux 2.0.

    msgrcv ¶

    msgrcv :: proc "contextless" (key: Key, buf: rawptr, size: int, type: uint, flags: bit_set[IPC_Flags_Bits; i16]) -> (int, Errno) {…}
     

    Receive a message from a SystemV message queue. Available since Linux 2.0.

    msgsnd ¶

    msgsnd :: proc "contextless" (key: Key, buf: rawptr, size: int, flags: bit_set[IPC_Flags_Bits; i16]) -> Errno {…}
     

    Send message to a SystemV message queue. Available since Linux 2.0.

    msync ¶

    msync :: proc "contextless" (addr: rawptr, size: uint, flags: bit_set[MSync_Flags_Bits; i32]) -> Errno {…}
     

    Sync file with memory map. Available since Linux 2.0.

    munlock ¶

    munlock :: proc "contextless" (addr: rawptr, size: uint) -> Errno {…}
     

    Unlock memory. Available since Linux 2.0.

    munlockall ¶

    munlockall :: proc "contextless" () -> Errno {…}
     

    Unlock all memory. Available since Linux 2.0.

    munmap ¶

    munmap :: proc "contextless" (addr: rawptr, size: uint) -> Errno {…}
     

    Unmap memory. Available since Linux 1.0.

    nanosleep ¶

    nanosleep :: proc "contextless" (req: ^Time_Spec, rem: ^Time_Spec) -> Errno {…}
     

    High-resolution sleep. Available since Linux 2.0.

    open ¶

    open :: proc "contextless" (name: cstring, flags: bit_set[Open_Flags_Bits; u32], mode: bit_set[Mode_Bits; u32] = {}) -> (Fd, Errno) {…}
     

    Open file, get the file descriptor Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    openat ¶

    openat :: proc "contextless" (fd: Fd, name: cstring, flags: bit_set[Open_Flags_Bits; u32], mode: bit_set[Mode_Bits; u32] = {}) -> (Fd, Errno) {…}
     

    Open file at the specified file descriptor. Available since Linux 2.6.16.

    pause ¶

    pause :: proc "contextless" () {…}
     

    Wait until the next signal is delivered. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    perf_cache_config ¶

    perf_cache_config :: proc "contextless" (id: Perf_Hardware_Cache_Id, op: Perf_Hardware_Cache_Op_Id, res: Perf_Hardware_Cache_Result_Id) -> u64 {…}
     

    / Helper function for constructing the config for caches

    perf_event_open ¶

    perf_event_open :: proc "contextless" (attr: ^Perf_Event_Attr, pid: Pid, cpu: int, group_fd: Fd, flags: bit_set[Perf_Flags_Bits; uint] = {}) -> (Fd, Errno) {…}
     

    Set up performance monitoring. Available since Linux 2.6.31.

    personality ¶

    personality :: proc "contextless" (personality: uint) -> (uint, Errno) {…}
     

    Set the process execution domain. Available since Linux 1.2.

    pidfd_getfd ¶

    pidfd_getfd :: proc "contextless" (pidfd: Pid_FD, fd: Fd, flags: i32 = 0) -> (Fd, Errno) {…}
     

    Get a file descriptor from another process. fd refers to a file descriptor number to get. flags must be zero. Available since Linux 5.3.

    pidfd_open ¶

    pidfd_open :: proc "contextless" (pid: Pid, flags: bit_set[Pid_FD_Flags_Bits; i32]) -> (Pid_FD, Errno) {…}
     

    Creates a new PID file descriptor. The process identified by pid must be a pid group leader. The returned pidfd has CLOEXEC semantics. Available since Linux 5.3.

    pipe2 ¶

    pipe2 :: proc "contextless" (pipes: ^[2]Fd, flags: bit_set[Open_Flags_Bits; u32]) -> Errno {…}
     

    Create a pipe Available since Linux 2.6.27

    poll ¶

    poll :: proc "contextless" (fds: []Poll_Fd, timeout: i32) -> (i32, Errno) {…}
     

    Wait on event on a file descriptor. Available since Linux 2.2.

    ppoll ¶

    ppoll :: proc "contextless" (fds: []Poll_Fd, timeout: ^Time_Spec, sigmask: ^[1]uint) -> (i32, Errno) {…}
     

    Wait for events on a file descriptor. Available since Linux 2.6.16.

    pread ¶

    pread :: proc "contextless" (fd: Fd, buf: []u8, offset: i64) -> (int, Errno) {…}
     

    Read the file at a specified offset. Note, it is not an error to return less bytes than requested. Available since Linux 2.2.

    ptrace_attach ¶

    ptrace_attach :: proc "contextless" (rq: PTrace_Attach_Type, pid: Pid) -> Errno {…}

    ptrace_cont ¶

    ptrace_cont :: proc "contextless" (rq: PTrace_Cont_Type, pid: Pid, sig: Signal) -> Errno {…}

    ptrace_detach ¶

    ptrace_detach :: proc "contextless" (rq: PTrace_Detach_Type, pid: Pid, sig: Signal) -> Errno {…}

    ptrace_geteventmsg ¶

    ptrace_geteventmsg :: proc "contextless" (rq: PTrace_Geteventmsg_Type, pid: Pid, msg: ^uint) -> Errno {…}

    ptrace_getfpregs ¶

    ptrace_getfpregs :: proc "contextless" (rq: PTrace_Getfpregs_Type, pid: Pid, buf: ^_Arch_User_FP_Regs) -> Errno {…}

    ptrace_getfpxregs ¶

    ptrace_getfpxregs :: proc "contextless" (rq: PTrace_Getfpxregs_Type, pid: Pid, buf: ^_Arch_User_FPX_Regs) -> Errno {…}

    ptrace_getregs ¶

    ptrace_getregs :: proc "contextless" (rq: PTrace_Getregs_Type, pid: Pid, buf: ^_Arch_User_Regs) -> Errno {…}

    ptrace_getregset ¶

    ptrace_getregset :: proc "contextless" (rq: PTrace_Getregset_Type, pid: Pid, note: PTrace_Note_Type, buf: ^IO_Vec) -> Errno {…}

    ptrace_getsiginfo ¶

    ptrace_getsiginfo :: proc "contextless" (rq: PTrace_Getsiginfo_Type, pid: Pid, si: ^Sig_Info) -> Errno {…}

    ptrace_getsigmask ¶

    ptrace_getsigmask :: proc "contextless" (rq: PTrace_Getsigmask_Type, pid: Pid, sigmask: ^[1]uint) -> Errno {…}

    ptrace_interrupt ¶

    ptrace_interrupt :: proc "contextless" (rq: PTrace_Interrupt_Type, pid: Pid) -> Errno {…}

    ptrace_listen ¶

    ptrace_listen :: proc "contextless" (rq: PTrace_Listen_Type, pid: Pid) -> Errno {…}

    ptrace_peek ¶

    ptrace_peek :: proc "contextless" (rq: PTrace_Peek_Type, pid: Pid, addr: uintptr) -> (uint, Errno) {…}

    ptrace_peeksiginfo ¶

    ptrace_peeksiginfo :: proc "contextless" (rq: PTrace_Peeksiginfo_Type, pid: Pid, si: ^Sig_Info) -> Errno {…}

    ptrace_poke ¶

    ptrace_poke :: proc "contextless" (rq: PTrace_Poke_Type, pid: Pid, addr: uintptr, data: uint) -> Errno {…}

    ptrace_seize ¶

    ptrace_seize :: proc "contextless" (rq: PTrace_Seize_Type, pid: Pid, opt: bit_set[PTrace_Options_Bits; u32]) -> Errno {…}

    ptrace_setfpregs ¶

    ptrace_setfpregs :: proc "contextless" (rq: PTrace_Setfpregs_Type, pid: Pid, buf: ^_Arch_User_FP_Regs) -> Errno {…}

    ptrace_setfpxregs ¶

    ptrace_setfpxregs :: proc "contextless" (rq: PTrace_Setfpxregs_Type, pid: Pid, buf: ^_Arch_User_FPX_Regs) -> Errno {…}

    ptrace_setoptions ¶

    ptrace_setoptions :: proc "contextless" (rq: PTrace_Setoptions_Type, pid: Pid, options: bit_set[PTrace_Options_Bits; u32]) -> Errno {…}

    ptrace_setregs ¶

    ptrace_setregs :: proc "contextless" (rq: PTrace_Setregs_Type, pid: Pid, buf: ^_Arch_User_Regs) -> Errno {…}

    ptrace_setregset ¶

    ptrace_setregset :: proc "contextless" (rq: PTrace_Setregset_Type, pid: Pid, note: PTrace_Note_Type, buf: ^IO_Vec) -> Errno {…}

    ptrace_setsigmask ¶

    ptrace_setsigmask :: proc "contextless" (rq: PTrace_Setsigmask_Type, pid: Pid, sigmask: ^[1]uint) -> Errno {…}

    ptrace_singlestep ¶

    ptrace_singlestep :: proc "contextless" (rq: PTrace_Singlestep_Type, pid: Pid, sig: Signal) -> Errno {…}

    ptrace_syscall ¶

    ptrace_syscall :: proc "contextless" (rq: PTrace_Syscall_Type, pid: Pid, sig: Signal) -> Errno {…}

    ptrace_sysemu ¶

    ptrace_sysemu :: proc "contextless" (rq: PTrace_Sysemu_Type, pid: Pid, sig: Signal) -> Errno {…}

    ptrace_sysemu_singlestep ¶

    ptrace_sysemu_singlestep :: proc "contextless" (rq: PTrace_Sysemu_Singlestep_Type, pid: Pid, sig: Signal) -> Errno {…}

    ptrace_traceme ¶

    ptrace_traceme :: proc "contextless" (rq: PTrace_Traceme_Type) -> Errno {…}

    pwrite ¶

    pwrite :: proc "contextless" (fd: Fd, buf: []u8, offset: i64) -> (int, Errno) {…}
     

    Read the file at a specified offset. Note, it is not an error to return less bytes than requested. Available since Linux 2.2.

    read ¶

    read :: proc "contextless" (fd: Fd, buf: []u8) -> (int, Errno) {…}
     

    Read data from file into the buffer Returns the number of bytes successfully read, which may be less than the size of the buffer even if the termination is successfull. Available since Linux 1.0. Before Linux 3.14, this operation is not atomic (i.e. not thread safe).

    readlink :: proc "contextless" (name: cstring, buf: []u8) -> (int, Errno) {…}
     

    Read the value of a symbolic link. Available since Linux 1.0. On arm64 available since Linux 2.6.16.

    readlinkat ¶

    readlinkat :: proc "contextless" (dirfd: Fd, name: cstring, buf: []u8) -> (int, Errno) {…}
     

    Read the value of a symbolic link at given dirfd. Available since Linux 2.6.16.

    readv ¶

    readv :: proc "contextless" (fd: Fd, iov: []IO_Vec) -> (int, Errno) {…}
     

    Read the data from file into multiple buffers. Available since Linux 2.0.

    recvfrom ¶

    recvfrom :: proc "contextless" (sock: Fd, buf: []u8, flags: bit_set[Socket_Msg_Bits; i32], addr: ^$) -> (int, Errno) {…}
     

    TODO(flysand): Rewrite recvfrom and sendto to use default parameters

    recvmmsg ¶

    recvmmsg :: proc "contextless" (sock: Fd, msg_vec: []MMsg_Hdr, flags: bit_set[Socket_Msg_Bits; i32]) -> (int, Errno) {…}
     

    Receive multiple messages from a socket. Available since Linux 2.6.33.

    recvmsg ¶

    recvmsg :: proc "contextless" (sock: Fd, msghdr: ^Msg_Hdr, flags: bit_set[Socket_Msg_Bits; i32]) -> (int, Errno) {…}
     

    Receive a message on a socket. Available since Linux 2.0.

    rename ¶

    rename :: proc "contextless" (old: cstring, new: cstring) -> Errno {…}
     

    Rename (move) the file. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    renameat ¶

    renameat :: proc "contextless" (oldfd: Fd, old: cstring, newfd: Fd, new: cstring) -> Errno {…}
     

    Rename the file with names relative to the specified dirfd's. Available since Linux 2.6.16.

    renameat2 ¶

    renameat2 :: proc "contextless" (oldfd: Fd, old: cstring, newfd: Fd, new: cstring, flags: bit_set[Rename_Flags_Bits; u32]) -> Errno {…}
     

    Rename the file with names relative to the specified dirfd's with other options. Available since Linux 3.15.

    rmdir ¶

    rmdir :: proc "contextless" (name: cstring) -> Errno {…}
     

    Remove a directory specified by name. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    rt_sigaction ¶

    rt_sigaction :: proc "contextless" (sig: Signal, sigaction: ^Sig_Action($T), old_sigaction: ^Sig_Action) -> Errno {…}
     

    Alter an action taken by a process.

    rt_sigpending ¶

    rt_sigpending :: proc "contextless" (sigs: ^[1]uint) -> Errno {…}
     

    Examine pending signals. Available since Linux 2.2.

    rt_sigprocmask ¶

    rt_sigprocmask :: proc "contextless" (mask_kind: Sig_Mask_Kind, new_set: ^[1]uint, old_set: ^[1]uint) -> Errno {…}
     

    Examime and alter blocked signals. Available since Linux 2.2.

    rt_sigqueueinfo ¶

    rt_sigqueueinfo :: proc "contextless" (pid: Pid, sig: Signal, si: ^Sig_Info) -> Errno {…}
     

    Send signal information to a process. Available since Linux 2.2.

    rt_sigreturn ¶

    rt_sigreturn :: proc "c" () -> ! {…}
     

    Returns from signal handlers on some archs.

    rt_sigsuspend ¶

    rt_sigsuspend :: proc "contextless" (sigset: ^[1]uint) -> Errno {…}
     

    Replace the signal mask for a value with the new mask until a signal is received. Available since Linux 2.2.

    rt_sigtimedwait ¶

    rt_sigtimedwait :: proc "contextless" (sigs: ^[1]uint, info: ^Sig_Info, time_sus: ^Time_Spec) -> (Signal, Errno) {…}
     

    Synchronously wait for queued signals. Available since Linux 2.2.

    rt_tgsigqueueinfo ¶

    rt_tgsigqueueinfo :: proc "contextless" (tgid: Pid, pid: Pid, sig: Signal, si: ^Sig_Info) -> Errno {…}
     

    / Send signal information to a thread / Available since Linux 2.2

    sched_yield ¶

    sched_yield :: proc "contextless" () {…}
     

    Yield the processor. Available since Linux 2.0.

    semctl3 ¶

    semctl3 :: proc "contextless" (key: Key, semnum: i32, cmd: IPC_Cmd) -> (int, Errno) {…}

    semctl4 ¶

    semctl4 :: proc "contextless" (key: Key, semnum: i32, cmd: IPC_Cmd, semun: ^Sem_Un) -> (int, Errno) {…}

    semget ¶

    semget :: proc "contextless" (key: Key, n: i32, flags: bit_set[IPC_Flags_Bits; i16]) -> (Key, Errno) {…}
     

    Get a SystemV semaphore set identifier. Available since Linux 2.0.

    semop ¶

    semop :: proc "contextless" (key: Key, ops: []Sem_Buf) -> Errno {…}
     

    SystemV semaphore operations. Available since Linux 2.0.

    sendfile ¶

    sendfile :: proc "contextless" (out_fd: Fd, in_fd: Fd, offset: ^i64, count: uint) -> (int, Errno) {…}
     

    Transfer the data between file descriptors. Available since Linux 2.2. On 32-bit platforms available since Linux 2.6.

    sendmmsg ¶

    sendmmsg :: proc "contextless" (sock: Fd, msg_vec: []MMsg_Hdr, flags: bit_set[Socket_Msg_Bits; i32]) -> (int, Errno) {…}
     

    Send multiple messages on a socket. Available since Linux 3.0.

    sendmsg ¶

    sendmsg :: proc "contextless" (sock: Fd, msghdr: ^Msg_Hdr, flags: bit_set[Socket_Msg_Bits; i32]) -> (int, Errno) {…}
     

    Send a message on a socket. Available since Linux 2.0.

    sendto ¶

    sendto :: proc "contextless" (sock: Fd, buf: []u8, flags: bit_set[Socket_Msg_Bits; i32], addr: ^$) -> (int, Errno) {…}

    set_tid_address ¶

    set_tid_address :: proc "contextless" (tidptr: ^u32) {…}
     

    Set the address of the futex that's gonna be waken when. current thread terminates. Available since Linux 2.6.

    setdomainname ¶

    setdomainname :: proc "contextless" (name: string) -> Errno {…}
     

    Set domain name. Note: to get the domain name, use uname syscall. Available since Linux 2.2.

    setgid ¶

    setgid :: proc "contextless" (gid: Gid) -> Errno {…}
     

    Set effective group id. If the process is privileged also sets real group id. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    setgroups ¶

    setgroups :: proc "contextless" (gids: []Gid) -> Errno {…}
     

    Set supplementary group IDs. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    sethostname ¶

    sethostname :: proc "contextless" (hostname: string) -> Errno {…}
     

    Set hostname. Note: to get the host name, use uname syscall. Available since Linux 1.0.

    setitimer ¶

    setitimer :: proc "contextless" (which: ITimer_Which, new: ^ITimer_Val, old: ^ITimer_Val) -> Errno {…}
     

    Set the value of an internal timer. Available since Linux 1.0.

    setpgid ¶

    setpgid :: proc "contextless" (pid: Pid, pgid: Pid) -> Errno {…}
     

    Set process group. Available since Linux 1.0.

    setpriority ¶

    setpriority :: proc "contextless" (which: Priority_Which, who: i32, prio: i32) -> Errno {…}
     

    Set priority on user, process group or process. Available since Linux 1.0.

    setregid ¶

    setregid :: proc "contextless" (real: Gid, effective: Gid) -> Errno {…}
     

    Set real and/or effective group id. If any of the arguments is -1, the corresponding id is not changed. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    setresgid ¶

    setresgid :: proc "contextless" (real: Gid, effective: Gid, saved: Uid) -> Errno {…}
     

    Set real, effective and/or saved group id. If any of the arguments is -1, the corresponding id is not changed. Available since Linux 2.2. On 32-bit platforms available since Linux 2.4.

    setresuid ¶

    setresuid :: proc "contextless" (real: Uid, effective: Uid, saved: Uid) -> Errno {…}
     

    Set real, effective and/or saved user id. If any of the arguments is -1, the corresponding id is not changed. Available since Linux 2.2. On 32-bit platforms available since Linux 2.4.

    setreuid ¶

    setreuid :: proc "contextless" (real: Uid, effective: Uid) -> Errno {…}
     

    Set real and/or effective user id. If any of the arguments is -1, the corresponding id is not changed. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    setrlimit ¶

    setrlimit :: proc "contextless" (kind: RLimit_Kind, resource: ^RLimit) -> Errno {…}
     

    Set limits on resources. Available since Linux 1.0.

    setsid ¶

    setsid :: proc "contextless" () -> (Pid, Errno) {…}
     

    Create a session and set the process group ID. Available since Linux 2.0.

    setsockopt_base ¶

    setsockopt_base :: proc "contextless" (sock: Fd, level: int, opt: int, val: $) -> Errno {…}
     

    TODO(flysand): the parameters are the same, maybe there's a way to make it into a single proc, sacrificing type safety slightly TODO(flysand): add ability to specify slices

    setsockopt_sock ¶

    setsockopt_sock :: proc "contextless" (sock: Fd, level: Socket_API_Level_Sock, opt: Socket_Option, val: $) -> Errno {…}

    setsockopt_tcp ¶

    setsockopt_tcp :: proc "contextless" (sock: Fd, level: Socket_API_Level_TCP, opt: Socket_TCP_Option, val: $) -> Errno {…}

    setsockopt_udp ¶

    setsockopt_udp :: proc "contextless" (sock: Fd, level: Socket_API_Level_UDP, opt: Socket_UDP_Option, val: $) -> Errno {…}

    setuid ¶

    setuid :: proc "contextless" (uid: Uid) -> Errno {…}
     

    Set effective User ID. Available since Linux 1.0. On 32-bit platforms available since Linux 2.4.

    shmat ¶

    shmat :: proc "contextless" (key: Key, addr: rawptr, flags: bit_set[IPC_Flags_Bits; i16]) -> (rawptr, Errno) {…}
     

    SystemV shared memory segment operations. Available since Linux 2.0.

    shmctl_ds ¶

    shmctl_ds :: proc "contextless" (key: Key, cmd: IPC_Cmd, buf: ^_Arch_Shmid_DS) -> Errno {…}

    shmctl_info ¶

    shmctl_info :: proc "contextless" (key: Key, cmd: IPC_Cmd, buf: ^Shm_Info) -> (int, Errno) {…}

    shmdt ¶

    shmdt :: proc "contextless" (shmaddr: rawptr) -> Errno {…}
     

    SystemV shared memory operations. Available since Linux 2.0.

    shmget ¶

    shmget :: proc "contextless" (key: Key, size: uint, flags: bit_set[IPC_Flags_Bits; i16]) -> (Key, Errno) {…}
     

    Allocate a SystemV shared memory segment. Available since Linux 2.0.

    shutdown ¶

    shutdown :: proc "contextless" (sock: Fd, how: Shutdown_How) -> Errno {…}
     

    Shutdown a socket. Available since Linux 2.0.

    sigaltstack ¶

    sigaltstack :: proc "contextless" (stack: ^Sig_Stack, old_stack: ^Sig_Stack) -> Errno {…}
     

    Set or get signal stack context. Available since Linux 2.2.

    socket ¶

    socket :: proc "contextless" (domain: Address_Family, socktype: Socket_Type, sockflags: bit_set[Socket_FD_Flags_Bits; int], protocol: Protocol) -> (Fd, Errno) {…}
     

    Create a socket file descriptor. Available since Linux 2.0.

    socketpair ¶

    socketpair :: proc "contextless" (domain: Protocol_Family, type: Socket_Type, proto: Protocol, pair: ^[2]Fd) -> Errno {…}
     

    Create a pair of connected sockets. Available since Linux 2.0.

    splice ¶

    splice :: proc "contextless" (
    	fd_in:   Fd, 
    	off_in:  ^i64, 
    	fd_out:  Fd, 
    	off_out: ^i64, 
    	len:     uint, 
    	flags:   bit_set[Splice_Flags_Bits; u32], 
    ) -> (int, Errno) {…}
     

    Transfer the data between file descriptors. Available since Linux 2.6.17.

    stat ¶

    stat :: proc "contextless" (filename: cstring, stat: ^Stat) -> Errno {…}
     

    Get file status.

    Returns information about the file in struct pointed to by stat parameter.

    Available since Linux 1.0 For 32-bit systems a different syscall is used that became available since 2.4. Not available on ARM64.

    statfs ¶

    statfs :: proc "contextless" (path: cstring, statfs: ^Stat_FS) -> Errno {…}
     

    Query information about filesystem.

    Available since Linux 1.0. For 32-bit systems a different syscall is used that became available since 2.6.

    statx ¶

    statx :: proc "contextless" (dir: Fd, pathname: cstring, flags: bit_set[FD_Flags_Bits; i32], mask: bit_set[Statx_Mask_Bits; u32], statx: ^Statx) -> Errno {…}
     

    Query extended information about the file

    The file can be specified as: absolute pathname: dir parameter is ignored relatvie pathname: dir parameter specifies the base directory's fd file descriptor: AT_EMPTY_PATH is passed in flags, pathname is empty, dir specifies the file descriptor

    Available since Linux 4.11

    symlink :: proc "contextless" (target: cstring, linkpath: cstring) -> Errno {…}
     

    Create a symbolic link. Available since Linux 1.0. On arm64 available since Linux 2.6.16.

    symlinkat ¶

    symlinkat :: proc "contextless" (target: cstring, dirfd: Fd, linkpath: cstring) -> Errno {…}
     

    Create a symbolic link at specified dirfd. Available since Linux 2.6.16.

    sysinfo ¶

    sysinfo :: proc "contextless" (sysinfo: ^Sys_Info) -> Errno {…}
     

    Get information about the system. Available since Linux 1.0.

    syslog ¶

    syslog :: proc "contextless" (act: Syslog_Action, buf: []u8) -> (int, Errno) {…}
     

    Read or clear kernel message ring buffer. Available since Linux 1.0.

    tee ¶

    tee :: proc "contextless" (fd_in: Fd, fd_out: Fd, len: uint, flags: bit_set[Splice_Flags_Bits; u32]) -> (int, Errno) {…}
     

    Transfer the data between file descriptors. Available since Linux 2.6.16.

    tgkill ¶

    tgkill :: proc "contextless" (tgid, tid: Pid, sig: Signal) -> Errno {…}
     

    Send a signal to a specific thread in a thread group. Available since Linux 2.6.

    time ¶

    time :: proc "contextless" (tloc: ^uint) -> Errno {…}
     

    Get current time in seconds. Available since Linux 1.0.

    timer_create ¶

    timer_create :: proc "contextless" (clock_id: Clock_Id, sigevent: ^Sig_Event, timer: ^Timer) -> Errno {…}
     

    Create POSIX per-process timer. Available since Linux 2.6.

    timer_delete ¶

    timer_delete :: proc "contextless" (timer: Timer) -> Errno {…}
     

    Delete a POSIX per-process timer. Available since Linux 2.6.

    timer_getoverrun ¶

    timer_getoverrun :: proc "contextless" (timer: Timer) -> (int, Errno) {…}
     

    Get overrun count of the POSIX per-process timer. Available since Linux 2.6.

    timer_gettime ¶

    timer_gettime :: proc "contextless" (timer: Timer, curr_value: ^ITimer_Spec) -> Errno {…}
     

    Get the state of the POSIX per-process timer. Available since Linux 2.6.

    timer_settime ¶

    timer_settime :: proc "contextless" (timer: Timer, flags: bit_set[ITimer_Flags_Bits; u32], #no_alias new_value, #no_alias old_value: ^ITimer_Spec) -> Errno {…}
     

    Arm/disarm the state of the POSIX per-process timer. Available since Linux 2.6.

    times ¶

    times :: proc "contextless" (tms: ^Tms) -> Errno {…}
     

    Get current process times. Available since Linux 1.0.

    truncate ¶

    truncate :: proc "contextless" (name: cstring, length: i64) -> Errno {…}
     

    Truncate a file to specified length. Available since Linux 1.0. On 32-bit architectures available since Linux 2.4.

    umask ¶

    umask :: proc "contextless" (mask: bit_set[Mode_Bits; u32]) -> bit_set[Mode_Bits; u32] {…}
     

    Set file mode creation mask. Available since Linux 1.0.

    uname ¶

    uname :: proc "contextless" (uts_name: ^UTS_Name) -> Errno {…}
     

    Get system information. Available since Linux 1.0.

    unlink :: proc "contextless" (name: cstring) -> Errno {…}
     

    Delete a name, and possible a file it refers to. Available since Linux 1.0. On ARM64 available since Linux 2.6.16.

    unlinkat ¶

    unlinkat :: proc "contextless" (dirfd: Fd, name: cstring, flags: bit_set[FD_Flags_Bits; i32]) -> Errno {…}
     

    Remove a directory entry relative to a directory file descriptor. Available since Linux 2.6.16.

    utimensat ¶

    utimensat :: proc "contextless" (dirfd: Fd, name: cstring, utimes: [^]Time_Spec, flags: bit_set[FD_Flags_Bits; i32]) -> Errno {…}
     

    Change file timestamps with nanosecond precision. utimes must point to an array of two Time_Spec's. The "utime" is the last access time, the second is last modification time. Available since Linux 2.6.22.

    vfork ¶

    vfork :: proc "contextless" () -> Pid {…}
     

    Create a child process and block parent. Available since Linux 2.2.

    wait4 ¶

    wait4 :: proc "contextless" (pid: Pid, status: ^u32, options: bit_set[Wait_Option; i32], rusage: ^RUsage) -> (Pid, Errno) {…}
     

    Wait for the process to change state. Available since Linux 1.0.

    waitid ¶

    waitid :: proc "contextless" (id_type: Id_Type, id: Id, sig_info: ^Sig_Info, options: bit_set[Wait_Option; i32], rusage: ^RUsage) -> Errno {…}
     

    Wait on process, process group or pid file descriptor. Available since Linux 2.6.10.

    waitpid ¶

    waitpid :: wait4
     

    Wait for the process to change state. Available since Linux 1.0.

    write ¶

    write :: proc "contextless" (fd: Fd, buf: []u8) -> (int, Errno) {…}
     

    Write the data from a buffer into the file Returns the number of bytes successfully written, which may be less than the size of the buffer, even if the termination is successfull When using direct I/O, error doesn't mean the write has failed. Partial data may have been written. If .Eintr is returned, the write operation has failed due to interrupt. You'll probably need to restart this syscall

    Available since Linux 1.0 Before Linux 3.14 this operation is not atomic (i.e. not thread safe)

    writev ¶

    writev :: proc "contextless" (fd: Fd, iov: []IO_Vec) -> (int, Errno) {…}
     

    Write the data from multiple buffers into a file. Available since Linux 2.0.

    Procedure Groups

    getsockopt ¶

     

    Get socket option for a given socket API level. Available since Linux 2.0.

    recv ¶

    recv :: proc{
    	recvfrom,
    	recv_noaddr,
    }
    
     

    Receive a message from a socket. Available since Linux 2.0.

    semctl ¶

    semctl :: proc{
    	semctl3,
    	semctl4,
    }
    
     

    SystemV semaphore control operations. Available since Linux 2.0.

    send ¶

    send :: proc{
    	sendto,
    	send_noaddr,
    }
    
     

    Send a message through a socket. Available since Linux 2.0.

    setsockopt ¶

     

    Set socket option for a given socket API level. Available since Linux 2.0.

    shmctl ¶

    shmctl :: proc{
    	shmctl_ds,
    	shmctl_info,
    }
    
     

    SystemV shared memory control. Available since Linux 2.0.

    Source Files

    Generation Information

    Generated with odin version dev-2024-10 (vendor "odin") Windows_amd64 @ 2024-10-05 21:10:06.496410500 +0000 UTC