Sign in Join
FPDoc Onlineexperiment

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_DatarecordEpoll data call structure.
EPoll_EventrecordStructure used in epoll_ctl call.
inotify_eventrecordINotify event structure.
statx_timestamprecord
tstatxrecord
TSysInforecordRecord with system information, used by the call.
user_cap_datarecordCapability description record.
user_cap_headerrecordRoot user capabilities header.
user_descrecordTLS segment descriptor.

Procedures and functions

capgetfunctionReturn the capabilities for the indicated thread.
capsetfunctionSet the capabilities for the indicated thread.
clock_getresfunctionGet clock resolution.
clock_gettimefunctionGet the time of a clock.
clock_settimefunctionSet the time of a clock.
clonefunctionClone current process (create new thread).
epoll_createfunctionCreate new epoll file descriptor.
epoll_create1function
epoll_ctlfunctionModify an epoll file descriptor.
epoll_pwaitfunction
epoll_waitfunctionWait for an event on an epoll file descriptor.
fdatasyncfunctionSynchronize the data in memory with the data on storage device.
futexfunctionPerform a futex operation.
futex_opfunctionFutex operation:.
futimensfunction
getrandomfunction
inotify_add_watchfunctionAdd a watch to a notify file descriptor.
inotify_initfunctionInitialize a new inotify file descriptor.
inotify_init1functionInitialize a new inotify file descriptor with extra options.
inotify_rm_watchfunctionRemove watch from Inotify file descriptor.
modify_ldtfunction
sched_yieldprocedureYield the processor to another thread.
setregidfunctionSet Real and Effective Group ID.
setreuidfunction
statxfunction
sync_file_rangefunctionForce committing of data to disk.
SysinfofunctionReturn kernel system information.
utimensatfunction

Types

__s16type
__s32type
__s64type
__u16type
__u32type
__u64type
clockid_ttypeClock id type.
PEPoll_DatatypePointer to EPoll_Data record.
PEpoll_EventtypePointer to EPoll_Event type.
Pinotify_eventtypePointer to inotify_event structure.
pstatxtype
pstatx_timestamptype
PSysInfotypePointer to record.
Puser_cap_datatypePointer to user_cap_data record.
Puser_cap_headertypePointer to user_cap_header record.
PUser_DesctypePointer to User_Desc record.
TCloneFuncprocedure typeClone function prototype.
TEPoll_DatatypeAlias for EPoll_Data type.
TEPoll_EventtypeAlias for EPoll_Event type.
TUser_DesctypeAlias for user_desc record.

Constants

CAP_AUDIT_CONTROLconstantAllow manipulation of kernel auditing features.
CAP_AUDIT_WRITEconstantAllow writing to kernel audit log.
CAP_CHOWNconstantPerform chown operation.
CAP_DAC_OVERRIDEconstantBypass file operation (rwx) checks.
CAP_DAC_READ_SEARCHconstantBypass file read-only operation checks.
CAP_FOWNERconstantBypass owner ID checks.
CAP_FS_MASKconstant?
CAP_FSETIDconstantDo not clear SUID/GUID bits on modified files.
CAP_IPC_LOCKconstantAllow memory locking calls.
CAP_IPC_OWNERconstantBypass permission checks on IPC operations.
CAP_KILLconstantBypass permission checks for sending signals.
CAP_LEASEconstantAllow file leases.
CAP_LINUX_IMMUTABLEconstantAllow setting ext2 file attributes.
CAP_MKNODconstantAllow creation of special files through mknod calls.
CAP_NET_ADMINconstantAllow network operations (e.g. setting socket options).
CAP_NET_BIND_SERVICEconstantAllow binding to ports less than 1024.
CAP_NET_BROADCASTconstantAllow socket broadcast operations.
CAP_NET_RAWconstantAllow use of RAW and PACKET sockets.
CAP_SETGIDconstantAllow GID manipulations.
CAP_SETPCAPconstantAllow to set other process' capabilities.
CAP_SETUIDconstantAllow process ID manipulations.
CAP_SYS_ADMINconstantAllow various system administration calls.
CAP_SYS_BOOTconstantAllow reboot calls.
CAP_SYS_CHROOTconstantAllow chroot calls.
CAP_SYS_MODULEconstantAllow loading/unloading of kernel modules.
CAP_SYS_NICEconstantAllowing raising process and thread priorities.
CAP_SYS_PACCTconstantAllow acct calls.
CAP_SYS_PTRACEconstantAllow ptrace calls.
CAP_SYS_RAWIOconstantAllow raw I/O port operations.
CAP_SYS_RESOURCEconstantAllow use of special resources or raising of resource limits.
CAP_SYS_TIMEconstantAllow system or real-time clock modification.
CAP_SYS_TTY_CONFIGconstantAllow vhangup calls.
CLOCK_MONOTONICconstantMonotonic system time since some undetermined start point. Can change if time is set.
CLOCK_MONOTONIC_COARSEconstantLess precise (but faster) version of CLOCK_MONOTONIC.
CLOCK_MONOTONIC_RAWconstantLike CLOCK_MONOTONIC, not subject to NTP adjustments.
CLOCK_PROCESS_CPUTIME_IDconstantProcesss-specific high-resolution timer from the CPU.
CLOCK_REALTIMEconstantSystem wide real-time clock. Can only be set by root.
CLOCK_REALTIME_COARSEconstantLess precise (but faster) version of CLOCK_REALTIME.
CLOCK_SGI_CYCLEconstantHigh resolution timer.
CLOCK_THREAD_CPUTIME_IDconstantThread-specific high-resolution timer from the CPU.
CLOCKS_MASKconstantMask for supported clocks.
CLOCKS_MONOconstantMonotonic clocks mask.
CLONE_CHILD_CLEARTIDconstantClone option: Erase child thread ID in child memory space when child exits.
CLONE_CHILD_SETTIDconstantClone option: Store child thread ID in child memory.
CLONE_DETACHEDconstantClone option: Start clone detached.
CLONE_FILESconstantoption: open files shared between processes.
CLONE_FSconstantoption: fs info shared between processes.
CLONE_NEWNSconstantClone options: Start child in new (file system) namespace.
CLONE_PARENTconstantClone options: Set child parent to parent of calling process.
CLONE_PARENT_SETTIDconstantClone option: Store child thread ID in memory in both parent and child.
CLONE_PIDconstantoption: PID shared between processes.
CLONE_PTRACEconstantClone options: if parent is traced, trace child also.
CLONE_SETTLSconstantClone option: The newtls parameter is the TLS descriptor of the child.
CLONE_SIGHANDconstantoption: signal handlers shared between processes.
CLONE_STOPPEDconstantClone option: Start child in stopped state.
CLONE_SYSVSEMconstantClone option: Caller and child share the same semaphore undo values.
CLONE_THREADconstantClone options: Set child in thread group of calling process.
CLONE_UNTRACEDconstantClone option: Do not allow a ptrace call on this clone.
CLONE_VFORKconstantClone options: suspend parent till child execs.
CLONE_VMconstantoption: VM shared between processes.
CSIGNALconstantoption: Signal mask to be sent at exit.
EPOLL_CTL_ADDconstantAdd filedescriptor to list of events.
EPOLL_CTL_DELconstantDelete event for filedescriptor.
EPOLL_CTL_MODconstantModify event for filedescriptor.
EPOLLERRconstantevent_wait error condition on file descriptor.
EPOLLETconstantSet event_wait edge trigger behaviour on file descriptor.
EPOLLHUPconstantevent_wait hang up event.
EPOLLINconstantevent_wait input file descriptor ready event.
EPOLLONESHOTconstantSet single-shot behaviour on epoll_wait.
EPOLLOUTconstantevent_wait output file descriptor ready event.
EPOLLPRIconstantevent_wait high priority data available on input file descriptor.
FUTEX_CMP_REQUEUEconstantFutex option: requeue waiting processes on other futex, but check it's value first.
FUTEX_FDconstantFutex option: Associate file descriptor with futex.
FUTEX_LOCK_PIconstantFutex option: Undocumented.
FUTEX_OP_ADDconstantFutex operation: Undocumented.
FUTEX_OP_ANDNconstantFutex operation: Undocumented.
FUTEX_OP_CMP_EQconstantFutex operation: Undocumented.
FUTEX_OP_CMP_GEconstantFutex operation: Undocumented.
FUTEX_OP_CMP_GTconstantFutex operation: Undocumented.
FUTEX_OP_CMP_LEconstantFutex operation: Undocumented.
FUTEX_OP_CMP_LTconstantFutex operation: Undocumented.
FUTEX_OP_CMP_NEconstantFutex operation: Undocumented.
FUTEX_OP_OPARG_SHIFTconstantFutex operation: Undocumented.
FUTEX_OP_ORconstantFutex operation: Undocumented.
FUTEX_OP_SETconstantFutex operation: Undocumented.
FUTEX_OP_XORconstantFutex operation: Undocumented.
FUTEX_REQUEUEconstantFutex option: requeue waiting processes on other futex.
FUTEX_TRYLOCK_PIconstantFutex option: Undocumented.
FUTEX_UNLOCK_PIconstantFutex option: Undocumented.
FUTEX_WAITconstantFutex option: Wait on futex till wake call arrives.
FUTEX_WAKEconstantFutex option: wakes any waiting processes on this futex.
FUTEX_WAKE_OPconstantFutex option: Undocumented.
GIO_CMAPconstantIOCTL: Get color palette on VGA+.
GIO_FONTconstantIOCTL: Get font in expanded form.
GIO_FONTXconstantIOCTL: Get font in consolefontdesc record.
GIO_SCRNMAPconstantIOCTL: get screen mapping from kernel.
GIO_UNIMAPconstantIOCTL: get unicode-to-font mapping from kernel.
GIO_UNISCRNMAPconstantIOCTL: get full Unicode screen mapping.
GRND_NONBLOCKconstant
GRND_RANDOMconstant
IN_ACCESSconstantData was read from file.
IN_ALL_EVENTSconstantAll possible events OR-ed together.
IN_ATTRIBconstantFile attributes changed.
IN_CLOEXECconstantInotify close on exec flag.
IN_CLOSEconstantFile was closed (read or write).
IN_CLOSE_NOWRITEconstantFile opened for read was closed.
IN_CLOSE_WRITEconstantFile opened for write was closed.
IN_CREATEconstantA file was created in the directory.
IN_DELETEconstantA file was deleted from the directory.
IN_DELETE_SELFconstantDirectory or file under observation was deleted.
IN_DONT_FOLLOWconstantDo not follow symlinks.
IN_IGNOREDconstantWatch was ignored (removed). Only reported.
IN_ISDIRconstantEvent subject is a directory (reported only).
IN_MASK_ADDconstantAdd events to existing watch (OR-ing the sets) if one exists.
IN_MODIFYconstantData was written to file.
IN_MOVEconstantFile was moved (in or out of directory).
IN_MOVE_SELFconstantDirectory or file under observation was moved.
IN_MOVED_FROMconstantFile was moved away from watched directory.
IN_MOVED_TOconstantFile was moved into watched directory.
IN_NONBLOCKconstantDo not block on read.
IN_ONESHOTconstantOnly report one event, then remove the watch.
IN_ONLYDIRconstantOnly watch filename if it is a directory.
IN_OPENconstantFile was opened.
IN_Q_OVERFLOWconstantQueue overflowed. Only reported.
IN_UNMOUNTconstantFile system on which file resides was unmounted. Only reported.
KB_101constantIOCTL: Keyboard types: 101 keys.
KB_84constantIOCTL: Keyboard types: 84 keys.
KB_OTHERconstantIOCTL: Keyboard types: other type.
KD_GRAPHICSconstantIOCTL: Tty modes: graphics mode.
KD_TEXTconstantIOCTL: Tty modes: Text mode.
KD_TEXT0constantIOCTL: Tty modes: Text mode (obsolete).
KD_TEXT1constantIOCTL: Tty modes: Text mode (obsolete).
KDADDIOconstantIOCTL: add i/o port as valid.
KDDELIOconstantIOCTL: delete i/o port as valid.
KDDISABIOconstantIOCTL: disable i/o to video board.
KDENABIOconstantIOCTL: enable i/o to video board.
KDFONTOPconstantIOCTL: font operations.
KDGETKEYCODEconstantIOCTL: read kernel keycode table entry.
KDGETLEDconstantIOCTL: return current led state.
KDGETMODEconstantIOCTL: get current mode.
KDGKBDIACRconstantIOCTL: read kernel accent table.
KDGKBTYPEconstantIOCTL: get keyboard type.
KDMAPDISPconstantIOCTL: map display into address space.
KDMKTONEconstantIOCTL: generate tone.
KDSETKEYCODEconstantIOCTL: write kernel keycode table entry.
KDSETLEDconstantIOCTL: set led state.
KDSETMODEconstantIOCTL: set text/graphics mode.
KDSIGACCEPTconstantIOCTL: accept kbd generated signals.
KDSKBDIACRconstantIOCTL: write kernel accent table.
KDUNMAPDISPconstantIOCTL: unmap display from address space.
KIOCSOUNDconstantIOCTL: start/stop sound generation (0 for off).
LED_CAPconstantIOCTL: LED_CAP : caps lock led.
LED_NUMconstantIOCTL: LED_SCR : Num lock led.
LED_SCRconstantIOCTL: LED_SCR : scroll lock led.
LINUX_CAPABILITY_VERSIONconstantCurrent capability version in use by kernel.
MAP_DENYWRITEconstantRead-only.
MAP_EXECUTABLEconstantMemory area is marked as executable.
MAP_GROWSDOWNconstantMemory map grows down, like stack.
MAP_LOCKEDconstantMemory pages are locked.
MAP_NORESERVEconstantDo not check for reservations.
MAX_CLOCKSconstantMaximum number of clocks in the system.
MODIFY_LDT_CONTENTS_CODEconstantModify_ldt option: Undocumented.
MODIFY_LDT_CONTENTS_DATAconstantModify_ldt option: Undocumented.
MODIFY_LDT_CONTENTS_STACKconstantModify_ldt option: Undocumented.
O_CLOEXECconstantClose on exec flag: close file handle on exec call.
PIO_CMAPconstantIOCTL: Set color palette on VGA+.
PIO_FONTconstantIOCTL: Use font in expanded form.
PIO_FONTRESETconstantIOCTL: Reset to default font.
PIO_FONTXconstantIOCTL: Set font in consolefontdesc record.
PIO_SCRNMAPconstantIOCTL: put screen mapping table in kernel.
PIO_UNIMAPconstantIOCTL: put unicode-to-font mapping in kernel.
PIO_UNIMAPCLRconstantIOCTL: clear table, possibly advise hash algorithm.
PIO_UNISCRNMAPconstantIOCTL: set full Unicode screen mapping.
POLLMSGconstantUnused in Linux.
POLLRDHUPconstantPeer Shutdown/closed writing half of connection.
POLLREMOVEconstantUndocumented Linux extension of Poll.
SPLICE_F_GIFTconstantPages spliced in are a gift.
SPLICE_F_MOREconstantExpect more data.
SPLICE_F_MOVEconstantMove pages instead of copying.
SPLICE_F_NONBLOCKconstantDon't block on pipe splicing operations.
STATX__RESERVEDconstant
STATX_ALLconstant
STATX_ATIMEconstant
STATX_ATTR_APPENDconstant
STATX_ATTR_AUTOMOUNTconstant
STATX_ATTR_COMPRESSEDconstant
STATX_ATTR_ENCRYPTEDconstant
STATX_ATTR_IMMUTABLEconstant
STATX_ATTR_NODUMPconstant
STATX_BASIC_STATSconstant
STATX_BLOCKSconstant
STATX_BTIMEconstant
STATX_CTIMEconstant
STATX_GIDconstant
STATX_INOconstant
STATX_MODEconstant
STATX_MTIMEconstant
STATX_NLINKconstant
STATX_SIZEconstant
STATX_TYPEconstant
STATX_UIDconstant
SYNC_FILE_RANGE_WAIT_AFTERconstantWait upon write-out of specified pages in the range after performing any write.
SYNC_FILE_RANGE_WAIT_BEFOREconstantWait for write-out of previously-submitted specified pages before writing more data.
SYNC_FILE_RANGE_WRITEconstantInitiate write of all dirty pages in the specified range.
UD_CONTENTS_CODEconstantTLS segment descriptor: Undocumented.
UD_CONTENTS_DATAconstantTLS segment descriptor: Undocumented.
UD_CONTENTS_STACKconstantTLS segment descriptor: Undocumented.
UD_LIMIT_IN_PAGESconstantTLS segment descriptor: Undocumented.
UD_LMconstantTLS segment descriptor: Undocumented.
UD_READ_EXEC_ONLYconstantTLS segment descriptor: Undocumented.
UD_SEG_32BITconstantTLS segment descriptor : Undocumented.
UD_SEG_NOT_PRESENTconstantTLS segment descriptor: Undocumented.
UD_USEABLEconstantTLS segment descriptor: Undocumented.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.