Linux unit
Linux-specific operating system calls.
The linux unit contains Linux specific operating system calls.
The platform independent functionality of the FPC 1.0.X version of the
linux unit has been split out over the
UNIX, baseunix and
unixutil units.
The X86-specific parts have been moved to the X86 unit.
Classes and records
EPoll_Data | record | Epoll data call structure. |
EPoll_Event | record | Structure used in epoll_ctl call. |
inotify_event | record | INotify event structure. |
statx_timestamp | record | |
tstatx | record | |
TSysInfo | record | Record with system information, used by the call. |
user_cap_data | record | Capability description record. |
user_cap_header | record | Root user capabilities header. |
user_desc | record | TLS segment descriptor. |
Procedures and functions
capget | function | Return the capabilities for the indicated thread. |
capset | function | Set the capabilities for the indicated thread. |
clock_getres | function | Get clock resolution. |
clock_gettime | function | Get the time of a clock. |
clock_settime | function | Set the time of a clock. |
clone | function | Clone current process (create new thread). |
epoll_create | function | Create new epoll file descriptor. |
epoll_create1 | function | |
epoll_ctl | function | Modify an epoll file descriptor. |
epoll_pwait | function | |
epoll_wait | function | Wait for an event on an epoll file descriptor. |
fdatasync | function | Synchronize the data in memory with the data on storage device. |
futex | function | Perform a futex operation. |
futex_op | function | Futex operation:. |
futimens | function | |
getrandom | function | |
inotify_add_watch | function | Add a watch to a notify file descriptor. |
inotify_init | function | Initialize a new inotify file descriptor. |
inotify_init1 | function | Initialize a new inotify file descriptor with extra options. |
inotify_rm_watch | function | Remove watch from Inotify file descriptor. |
modify_ldt | function | |
sched_yield | procedure | Yield the processor to another thread. |
setregid | function | Set Real and Effective Group ID. |
setreuid | function | |
statx | function | |
sync_file_range | function | Force committing of data to disk. |
Sysinfo | function | Return kernel system information. |
utimensat | function |
Types
__s16 | type | |
__s32 | type | |
__s64 | type | |
__u16 | type | |
__u32 | type | |
__u64 | type | |
clockid_t | type | Clock id type. |
PEPoll_Data | type | Pointer to EPoll_Data record. |
PEpoll_Event | type | Pointer to EPoll_Event type. |
Pinotify_event | type | Pointer to inotify_event structure. |
pstatx | type | |
pstatx_timestamp | type | |
PSysInfo | type | Pointer to record. |
Puser_cap_data | type | Pointer to user_cap_data record. |
Puser_cap_header | type | Pointer to user_cap_header record. |
PUser_Desc | type | Pointer to User_Desc record. |
TCloneFunc | procedure type | Clone function prototype. |
TEPoll_Data | type | Alias for EPoll_Data type. |
TEPoll_Event | type | Alias for EPoll_Event type. |
TUser_Desc | type | Alias for user_desc record. |
Constants
CAP_AUDIT_CONTROL | constant | Allow manipulation of kernel auditing features. |
CAP_AUDIT_WRITE | constant | Allow writing to kernel audit log. |
CAP_CHOWN | constant | Perform chown operation. |
CAP_DAC_OVERRIDE | constant | Bypass file operation (rwx) checks. |
CAP_DAC_READ_SEARCH | constant | Bypass file read-only operation checks. |
CAP_FOWNER | constant | Bypass owner ID checks. |
CAP_FS_MASK | constant | ? |
CAP_FSETID | constant | Do not clear SUID/GUID bits on modified files. |
CAP_IPC_LOCK | constant | Allow memory locking calls. |
CAP_IPC_OWNER | constant | Bypass permission checks on IPC operations. |
CAP_KILL | constant | Bypass permission checks for sending signals. |
CAP_LEASE | constant | Allow file leases. |
CAP_LINUX_IMMUTABLE | constant | Allow setting ext2 file attributes. |
CAP_MKNOD | constant | Allow creation of special files through mknod calls. |
CAP_NET_ADMIN | constant | Allow network operations (e.g. setting socket options). |
CAP_NET_BIND_SERVICE | constant | Allow binding to ports less than 1024. |
CAP_NET_BROADCAST | constant | Allow socket broadcast operations. |
CAP_NET_RAW | constant | Allow use of RAW and PACKET sockets. |
CAP_SETGID | constant | Allow GID manipulations. |
CAP_SETPCAP | constant | Allow to set other process' capabilities. |
CAP_SETUID | constant | Allow process ID manipulations. |
CAP_SYS_ADMIN | constant | Allow various system administration calls. |
CAP_SYS_BOOT | constant | Allow reboot calls. |
CAP_SYS_CHROOT | constant | Allow chroot calls. |
CAP_SYS_MODULE | constant | Allow loading/unloading of kernel modules. |
CAP_SYS_NICE | constant | Allowing raising process and thread priorities. |
CAP_SYS_PACCT | constant | Allow acct calls. |
CAP_SYS_PTRACE | constant | Allow ptrace calls. |
CAP_SYS_RAWIO | constant | Allow raw I/O port operations. |
CAP_SYS_RESOURCE | constant | Allow use of special resources or raising of resource limits. |
CAP_SYS_TIME | constant | Allow system or real-time clock modification. |
CAP_SYS_TTY_CONFIG | constant | Allow vhangup calls. |
CLOCK_MONOTONIC | constant | Monotonic system time since some undetermined start point. Can change if time is set. |
CLOCK_MONOTONIC_COARSE | constant | Less precise (but faster) version of CLOCK_MONOTONIC. |
CLOCK_MONOTONIC_RAW | constant | Like CLOCK_MONOTONIC, not subject to NTP adjustments. |
CLOCK_PROCESS_CPUTIME_ID | constant | Processs-specific high-resolution timer from the CPU. |
CLOCK_REALTIME | constant | System wide real-time clock. Can only be set by root. |
CLOCK_REALTIME_COARSE | constant | Less precise (but faster) version of CLOCK_REALTIME. |
CLOCK_SGI_CYCLE | constant | High resolution timer. |
CLOCK_THREAD_CPUTIME_ID | constant | Thread-specific high-resolution timer from the CPU. |
CLOCKS_MASK | constant | Mask for supported clocks. |
CLOCKS_MONO | constant | Monotonic clocks mask. |
CLONE_CHILD_CLEARTID | constant | Clone option: Erase child thread ID in child memory space when child exits. |
CLONE_CHILD_SETTID | constant | Clone option: Store child thread ID in child memory. |
CLONE_DETACHED | constant | Clone option: Start clone detached. |
CLONE_FILES | constant | option: open files shared between processes. |
CLONE_FS | constant | option: fs info shared between processes. |
CLONE_NEWNS | constant | Clone options: Start child in new (file system) namespace. |
CLONE_PARENT | constant | Clone options: Set child parent to parent of calling process. |
CLONE_PARENT_SETTID | constant | Clone option: Store child thread ID in memory in both parent and child. |
CLONE_PID | constant | option: PID shared between processes. |
CLONE_PTRACE | constant | Clone options: if parent is traced, trace child also. |
CLONE_SETTLS | constant | Clone option: The newtls parameter is the TLS descriptor of the child. |
CLONE_SIGHAND | constant | option: signal handlers shared between processes. |
CLONE_STOPPED | constant | Clone option: Start child in stopped state. |
CLONE_SYSVSEM | constant | Clone option: Caller and child share the same semaphore undo values. |
CLONE_THREAD | constant | Clone options: Set child in thread group of calling process. |
CLONE_UNTRACED | constant | Clone option: Do not allow a ptrace call on this clone. |
CLONE_VFORK | constant | Clone options: suspend parent till child execs. |
CLONE_VM | constant | option: VM shared between processes. |
CSIGNAL | constant | option: Signal mask to be sent at exit. |
EPOLL_CTL_ADD | constant | Add filedescriptor to list of events. |
EPOLL_CTL_DEL | constant | Delete event for filedescriptor. |
EPOLL_CTL_MOD | constant | Modify event for filedescriptor. |
EPOLLERR | constant | event_wait error condition on file descriptor. |
EPOLLET | constant | Set event_wait edge trigger behaviour on file descriptor. |
EPOLLHUP | constant | event_wait hang up event. |
EPOLLIN | constant | event_wait input file descriptor ready event. |
EPOLLONESHOT | constant | Set single-shot behaviour on epoll_wait. |
EPOLLOUT | constant | event_wait output file descriptor ready event. |
EPOLLPRI | constant | event_wait high priority data available on input file descriptor. |
FUTEX_CMP_REQUEUE | constant | Futex option: requeue waiting processes on other futex, but check it's value first. |
FUTEX_FD | constant | Futex option: Associate file descriptor with futex. |
FUTEX_LOCK_PI | constant | Futex option: Undocumented. |
FUTEX_OP_ADD | constant | Futex operation: Undocumented. |
FUTEX_OP_ANDN | constant | Futex operation: Undocumented. |
FUTEX_OP_CMP_EQ | constant | Futex operation: Undocumented. |
FUTEX_OP_CMP_GE | constant | Futex operation: Undocumented. |
FUTEX_OP_CMP_GT | constant | Futex operation: Undocumented. |
FUTEX_OP_CMP_LE | constant | Futex operation: Undocumented. |
FUTEX_OP_CMP_LT | constant | Futex operation: Undocumented. |
FUTEX_OP_CMP_NE | constant | Futex operation: Undocumented. |
FUTEX_OP_OPARG_SHIFT | constant | Futex operation: Undocumented. |
FUTEX_OP_OR | constant | Futex operation: Undocumented. |
FUTEX_OP_SET | constant | Futex operation: Undocumented. |
FUTEX_OP_XOR | constant | Futex operation: Undocumented. |
FUTEX_REQUEUE | constant | Futex option: requeue waiting processes on other futex. |
FUTEX_TRYLOCK_PI | constant | Futex option: Undocumented. |
FUTEX_UNLOCK_PI | constant | Futex option: Undocumented. |
FUTEX_WAIT | constant | Futex option: Wait on futex till wake call arrives. |
FUTEX_WAKE | constant | Futex option: wakes any waiting processes on this futex. |
FUTEX_WAKE_OP | constant | Futex option: Undocumented. |
GIO_CMAP | constant | IOCTL: Get color palette on VGA+. |
GIO_FONT | constant | IOCTL: Get font in expanded form. |
GIO_FONTX | constant | IOCTL: Get font in consolefontdesc record. |
GIO_SCRNMAP | constant | IOCTL: get screen mapping from kernel. |
GIO_UNIMAP | constant | IOCTL: get unicode-to-font mapping from kernel. |
GIO_UNISCRNMAP | constant | IOCTL: get full Unicode screen mapping. |
GRND_NONBLOCK | constant | |
GRND_RANDOM | constant | |
IN_ACCESS | constant | Data was read from file. |
IN_ALL_EVENTS | constant | All possible events OR-ed together. |
IN_ATTRIB | constant | File attributes changed. |
IN_CLOEXEC | constant | Inotify close on exec flag. |
IN_CLOSE | constant | File was closed (read or write). |
IN_CLOSE_NOWRITE | constant | File opened for read was closed. |
IN_CLOSE_WRITE | constant | File opened for write was closed. |
IN_CREATE | constant | A file was created in the directory. |
IN_DELETE | constant | A file was deleted from the directory. |
IN_DELETE_SELF | constant | Directory or file under observation was deleted. |
IN_DONT_FOLLOW | constant | Do not follow symlinks. |
IN_IGNORED | constant | Watch was ignored (removed). Only reported. |
IN_ISDIR | constant | Event subject is a directory (reported only). |
IN_MASK_ADD | constant | Add events to existing watch (OR-ing the sets) if one exists. |
IN_MODIFY | constant | Data was written to file. |
IN_MOVE | constant | File was moved (in or out of directory). |
IN_MOVE_SELF | constant | Directory or file under observation was moved. |
IN_MOVED_FROM | constant | File was moved away from watched directory. |
IN_MOVED_TO | constant | File was moved into watched directory. |
IN_NONBLOCK | constant | Do not block on read. |
IN_ONESHOT | constant | Only report one event, then remove the watch. |
IN_ONLYDIR | constant | Only watch filename if it is a directory. |
IN_OPEN | constant | File was opened. |
IN_Q_OVERFLOW | constant | Queue overflowed. Only reported. |
IN_UNMOUNT | constant | File system on which file resides was unmounted. Only reported. |
KB_101 | constant | IOCTL: Keyboard types: 101 keys. |
KB_84 | constant | IOCTL: Keyboard types: 84 keys. |
KB_OTHER | constant | IOCTL: Keyboard types: other type. |
KD_GRAPHICS | constant | IOCTL: Tty modes: graphics mode. |
KD_TEXT | constant | IOCTL: Tty modes: Text mode. |
KD_TEXT0 | constant | IOCTL: Tty modes: Text mode (obsolete). |
KD_TEXT1 | constant | IOCTL: Tty modes: Text mode (obsolete). |
KDADDIO | constant | IOCTL: add i/o port as valid. |
KDDELIO | constant | IOCTL: delete i/o port as valid. |
KDDISABIO | constant | IOCTL: disable i/o to video board. |
KDENABIO | constant | IOCTL: enable i/o to video board. |
KDFONTOP | constant | IOCTL: font operations. |
KDGETKEYCODE | constant | IOCTL: read kernel keycode table entry. |
KDGETLED | constant | IOCTL: return current led state. |
KDGETMODE | constant | IOCTL: get current mode. |
KDGKBDIACR | constant | IOCTL: read kernel accent table. |
KDGKBTYPE | constant | IOCTL: get keyboard type. |
KDMAPDISP | constant | IOCTL: map display into address space. |
KDMKTONE | constant | IOCTL: generate tone. |
KDSETKEYCODE | constant | IOCTL: write kernel keycode table entry. |
KDSETLED | constant | IOCTL: set led state. |
KDSETMODE | constant | IOCTL: set text/graphics mode. |
KDSIGACCEPT | constant | IOCTL: accept kbd generated signals. |
KDSKBDIACR | constant | IOCTL: write kernel accent table. |
KDUNMAPDISP | constant | IOCTL: unmap display from address space. |
KIOCSOUND | constant | IOCTL: start/stop sound generation (0 for off). |
LED_CAP | constant | IOCTL: LED_CAP : caps lock led. |
LED_NUM | constant | IOCTL: LED_SCR : Num lock led. |
LED_SCR | constant | IOCTL: LED_SCR : scroll lock led. |
LINUX_CAPABILITY_VERSION | constant | Current capability version in use by kernel. |
MAP_DENYWRITE | constant | Read-only. |
MAP_EXECUTABLE | constant | Memory area is marked as executable. |
MAP_GROWSDOWN | constant | Memory map grows down, like stack. |
MAP_LOCKED | constant | Memory pages are locked. |
MAP_NORESERVE | constant | Do not check for reservations. |
MAX_CLOCKS | constant | Maximum number of clocks in the system. |
MODIFY_LDT_CONTENTS_CODE | constant | Modify_ldt option: Undocumented. |
MODIFY_LDT_CONTENTS_DATA | constant | Modify_ldt option: Undocumented. |
MODIFY_LDT_CONTENTS_STACK | constant | Modify_ldt option: Undocumented. |
O_CLOEXEC | constant | Close on exec flag: close file handle on exec call. |
PIO_CMAP | constant | IOCTL: Set color palette on VGA+. |
PIO_FONT | constant | IOCTL: Use font in expanded form. |
PIO_FONTRESET | constant | IOCTL: Reset to default font. |
PIO_FONTX | constant | IOCTL: Set font in consolefontdesc record. |
PIO_SCRNMAP | constant | IOCTL: put screen mapping table in kernel. |
PIO_UNIMAP | constant | IOCTL: put unicode-to-font mapping in kernel. |
PIO_UNIMAPCLR | constant | IOCTL: clear table, possibly advise hash algorithm. |
PIO_UNISCRNMAP | constant | IOCTL: set full Unicode screen mapping. |
POLLMSG | constant | Unused in Linux. |
POLLRDHUP | constant | Peer Shutdown/closed writing half of connection. |
POLLREMOVE | constant | Undocumented Linux extension of Poll. |
SPLICE_F_GIFT | constant | Pages spliced in are a gift. |
SPLICE_F_MORE | constant | Expect more data. |
SPLICE_F_MOVE | constant | Move pages instead of copying. |
SPLICE_F_NONBLOCK | constant | Don't block on pipe splicing operations. |
STATX__RESERVED | constant | |
STATX_ALL | constant | |
STATX_ATIME | constant | |
STATX_ATTR_APPEND | constant | |
STATX_ATTR_AUTOMOUNT | constant | |
STATX_ATTR_COMPRESSED | constant | |
STATX_ATTR_ENCRYPTED | constant | |
STATX_ATTR_IMMUTABLE | constant | |
STATX_ATTR_NODUMP | constant | |
STATX_BASIC_STATS | constant | |
STATX_BLOCKS | constant | |
STATX_BTIME | constant | |
STATX_CTIME | constant | |
STATX_GID | constant | |
STATX_INO | constant | |
STATX_MODE | constant | |
STATX_MTIME | constant | |
STATX_NLINK | constant | |
STATX_SIZE | constant | |
STATX_TYPE | constant | |
STATX_UID | constant | |
SYNC_FILE_RANGE_WAIT_AFTER | constant | Wait upon write-out of specified pages in the range after performing any write. |
SYNC_FILE_RANGE_WAIT_BEFORE | constant | Wait for write-out of previously-submitted specified pages before writing more data. |
SYNC_FILE_RANGE_WRITE | constant | Initiate write of all dirty pages in the specified range. |
UD_CONTENTS_CODE | constant | TLS segment descriptor: Undocumented. |
UD_CONTENTS_DATA | constant | TLS segment descriptor: Undocumented. |
UD_CONTENTS_STACK | constant | TLS segment descriptor: Undocumented. |
UD_LIMIT_IN_PAGES | constant | TLS segment descriptor: Undocumented. |
UD_LM | constant | TLS segment descriptor: Undocumented. |
UD_READ_EXEC_ONLY | constant | TLS segment descriptor: Undocumented. |
UD_SEG_32BIT | constant | TLS segment descriptor : Undocumented. |
UD_SEG_NOT_PRESENT | constant | TLS segment descriptor: Undocumented. |
UD_USEABLE | constant | TLS segment descriptor: Undocumented. |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
