# Core API Documentation

_Peios Kernel / Internals / Core APIs_

> This is the beginning of a manual for core kernel APIs. The conversion (and writing!) of documents for this manual is much appreciated!

<a id="rst-core-api-documentation"></a>

This is the beginning of a manual for core kernel APIs.  The conversion (and writing\!) of documents for this manual is much appreciated\!

<a id="rst-core-utilities"></a>

## Core utilities

This section has general and "core core" documentation.  The first is a massive grab-bag of kerneldoc info left over from the docbook days; it should really be broken up someday when somebody finds the energy to do it.

- [The Linux Kernel API](</kernel/internals/core-api/kernel-api.md>)
- [Workqueue](</kernel/internals/core-api/workqueue.md>)
- [General notification mechanism](</kernel/internals/core-api/watch-queue.md>)
- [Message logging with printk](</kernel/internals/core-api/printk-basics.md>)
- [How to get printk format specifiers right](</kernel/internals/core-api/printk-formats.md>)
- [Printk Index](</kernel/internals/core-api/printk-index.md>)
- [Symbol Namespaces](</kernel/internals/core-api/symbol-namespaces.md>)
- [Assembler Annotations](</kernel/internals/core-api/asm-annotations.md>)
- [Real-time preemption](</kernel/internals/core-api/real-time/index.md>)
- [Housekeeping](</kernel/internals/core-api/housekeeping.md>)

<a id="rst-data-structures-and-low-level-utilities"></a>

## Data structures and low-level utilities

Library functionality that is used throughout the kernel.

- [Everything you never wanted to know about kobjects, ksets, and ktypes](</kernel/internals/core-api/kobject.md>)
- [Adding reference counters (krefs) to kernel objects](</kernel/internals/core-api/kref.md>)
- [Scope-based Cleanup Helpers](</kernel/internals/core-api/cleanup.md>)
- [Generic Associative Array Implementation](</kernel/internals/core-api/assoc-array.md>)
- [Folio Queue](</kernel/internals/core-api/folio-queue.md>)
- [XArray](</kernel/internals/core-api/xarray.md>)
- [Maple Tree](</kernel/internals/core-api/maple-tree.md>)
- [ID Allocation](</kernel/internals/core-api/idr.md>)
- [Circular Buffers](</kernel/internals/core-api/circular-buffers.md>)
- [Red-black Trees (rbtree) in Linux](</kernel/internals/core-api/rbtree.md>)
- [Generic radix trees/sparse arrays](</kernel/internals/core-api/generic-radix-tree.md>)
- [Generic bitfield packing and unpacking functions](</kernel/internals/core-api/packing.md>)
- [this_cpu operations](</kernel/internals/core-api/this-cpu-ops.md>)
- [ktime accessors](</kernel/internals/core-api/timekeeping.md>)
- [The errseq_t datatype](</kernel/internals/core-api/errseq.md>)
- [atomic_t](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/core-api/wrappers/atomic_t.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [atomic_bitops](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/core-api/wrappers/atomic_bitops.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Floating-point API](</kernel/internals/core-api/floating-point.md>)
- [Union-Find in Linux](</kernel/internals/core-api/union-find.md>)
- [Min Heap API](</kernel/internals/core-api/min-heap.md>)
- [Generic parser](</kernel/internals/core-api/parser.md>)
- [Linked Lists in Linux](</kernel/internals/core-api/list.md>)

<a id="rst-low-level-entry-and-exit"></a>

## Low level entry and exit

- [Entry/exit handling for exceptions, interrupts, syscalls and KVM](</kernel/internals/core-api/entry.md>)

<a id="rst-concurrency-primitives"></a>

## Concurrency primitives

How Linux keeps everything from happening at the same time.  See [Documentation/locking/index.rst](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/locking/index.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92) for more related documentation.

- [refcount_t API compared to atomic_t](</kernel/internals/core-api/refcount-vs-atomic.md>)
- [IRQs](</kernel/internals/core-api/irq/index.md>)
- [Semantics and Behavior of Local Atomic Operations](</kernel/internals/core-api/local-ops.md>)
- [The padata parallel execution mechanism](</kernel/internals/core-api/padata.md>)
- [RCU Handbook](</kernel/internals/rcu/index.md>)
- [memory-barriers](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/core-api/wrappers/memory-barriers.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)

<a id="rst-low-level-hardware-management"></a>

## Low-level hardware management

Cache management, managing CPU hotplug, etc.

- [Cache and TLB Flushing Under Linux](</kernel/internals/core-api/cachetlb.md>)
- [CPU hotplug in the Kernel](</kernel/internals/core-api/cpu-hotplug.md>)
- [Memory hotplug](</kernel/internals/core-api/memory-hotplug.md>)
- [Linux generic IRQ handling](</kernel/internals/core-api/genericirq.md>)
- [Memory Protection Keys](</kernel/internals/core-api/protection-keys.md>)

<a id="rst-memory-management"></a>

## Memory management

How to allocate and use memory in the kernel.  Note that there is a lot more memory-management documentation in [Documentation/mm/index.rst](/kernel/internals/mm/index.md).

- [Memory Allocation Guide](</kernel/internals/core-api/memory-allocation.md>)
- [Unaligned Memory Accesses](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/core-api/unaligned-memory-access.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)
- [Dynamic DMA mapping using the generic device](</kernel/internals/core-api/dma-api.md>)
- [Dynamic DMA mapping Guide](</kernel/internals/core-api/dma-api-howto.md>)
- [DMA attributes](</kernel/internals/core-api/dma-attributes.md>)
- [DMA with ISA and LPC devices](</kernel/internals/core-api/dma-isa-lpc.md>)
- [DMA and swiotlb](</kernel/internals/core-api/swiotlb.md>)
- [Memory Management APIs](</kernel/internals/core-api/mm-api.md>)
- [Cgroup Kernel APIs](</kernel/internals/core-api/cgroup.md>)
- [The genalloc/genpool subsystem](</kernel/internals/core-api/genalloc.md>)
- [pin_user_pages() and related calls](</kernel/internals/core-api/pin-user-pages.md>)
- [Boot time memory management](</kernel/internals/core-api/boot-time-mm.md>)
- [GFP masks used from FS/IO context](</kernel/internals/core-api/gfp-mask-from-fs-io.md>)
- [Kexec Handover Subsystem](</kernel/internals/core-api/kho/index.md>)

<a id="rst-interfaces-for-kernel-debugging"></a>

## Interfaces for kernel debugging

- [The object-lifetime debugging infrastructure](</kernel/internals/core-api/debug-objects.md>)
- [The Linux Kernel Tracepoint API](</kernel/internals/core-api/tracepoint.md>)
- [Using physical DMA provided by OHCI-1394 FireWire controllers for debugging](<https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/core-api/debugging-via-ohci1394.rst?id=9021cc14f7d98b4a1d2c932f52c5343d4d0f6b92>)

<a id="rst-everything-else"></a>

## Everything else

Documents that don't fit elsewhere or which have yet to be categorized.

- [Reed-Solomon Library Programming Interface](</kernel/internals/core-api/librs.md>)
- [Live Update Orchestrator](</kernel/internals/core-api/liveupdate.md>)
- [Netlink notes for kernel developers](</kernel/internals/core-api/netlink.md>)
