The Linux kernel provides several interfaces to user-space applications that are used for different purposes and that have different properties by design.
There are two types of application programming interface (API) in the Linux kernel that are not to be confused: the "kernel user-space" API and the "kernel-internal" API.
Kernel user-space API
The kernel user-space API is the API that allows programs in user space to access system resources and services of the Linux kernel. This API, by choice, never breaks. The POSIX API is only a small part of the Linux kernel API.
Much available free and open-source software is written for the POSIX API. But since the last POSIX version is from 2008, and since so much more development is going on with the Linux kernel as compared to the other POSIX-compatible kernels, various software has been developed that target solely the Linux kernel user-space API. Well-known examples are systemd and Weston.
People such as Lennart Poettering openly advocate writing software solely for the Linux kernel user-space API instead of POSIX, where this offers advantages.
In-kernel API
By choice, the Linux kernel has no stable in-kernel API (a.k.a. Binary Kernel Interface).[1]
See also
- C standard library – the library for the C programming language made available across implementations
- GNU C Library – the GNU Project's implementation of the C standard library
- system call – is a function to facilitate programs to requests services from the kernel
- netlink – Netlink was added by Alan Cox during Linux kernel 1.3 development as a character driver interface to provide multiple kernel and user-space bidirectional communications links. Then, Alexey Kuznetsov extended it during Linux kernel 2.1 development to provide a flexible and extensible messaging interface to the new advanced routing infrastructure. Since then, Netlink sockets have become one of the main interfaces that kernel subsystems provide to user-space applications in Linux.
- mmap – a system call
- fanotify – a system call
- dnotify - a system call
- inotify – a system call
- netlink – socket family used for IPC between kernel and user space processes, designed as the successor of ioctl
- Windows API – article on various API available on Microsoft Windows operating systems
- windows.h – header file for the C programming language which contains declarations for all of the functions in the Windows API
- Wine – a compatibility layer between Linux and programs written for Microsoft Windows
References
External links
- The API of Linux kernel 2.6.20 – sadly no current version available
- The Linux Programming Interface
- Interactive Linux kernel map with main API functions and structures
- Linux Device Drivers by Jonathan Corbet, Greg Kroah-Hartman and Alessandro Rubini, 3rd edition
- Linux Kernel Linked List Explained