6 List Management Functions
7 =========================
9 .. kernel-doc:: include/linux/list.h
12 Basic C Library Functions
13 =========================
15 When writing drivers, you cannot in general use routines which are from
16 the C Library. Some of the functions have been found generally useful
17 and they are listed below. The behaviour of these functions may vary
18 slightly from those defined by ANSI, and these deviations are noted in
24 .. kernel-doc:: lib/vsprintf.c
27 .. kernel-doc:: include/linux/kernel.h
30 .. kernel-doc:: include/linux/kernel.h
33 .. kernel-doc:: lib/kstrtox.c
39 .. kernel-doc:: lib/string.c
45 .. kernel-doc:: arch/x86/include/asm/bitops.h
48 Basic Kernel Library Functions
49 ==============================
51 The Linux kernel provides more basic utility functions.
56 .. kernel-doc:: lib/bitmap.c
57 :doc: bitmap introduction
59 .. kernel-doc:: include/linux/bitmap.h
62 .. kernel-doc:: include/linux/bitmap.h
65 .. kernel-doc:: include/linux/bitmap.h
68 .. kernel-doc:: lib/bitmap.c
71 .. kernel-doc:: lib/bitmap.c
74 .. kernel-doc:: include/linux/bitmap.h
80 .. kernel-doc:: lib/cmdline.c
86 .. kernel-doc:: lib/crc4.c
89 .. kernel-doc:: lib/crc7.c
92 .. kernel-doc:: lib/crc8.c
95 .. kernel-doc:: lib/crc16.c
98 .. kernel-doc:: lib/crc32.c
100 .. kernel-doc:: lib/crc-ccitt.c
103 .. kernel-doc:: lib/crc-itu-t.c
106 Math Functions in Linux
107 =======================
109 Base 2 log and power Functions
110 ------------------------------
112 .. kernel-doc:: include/linux/log2.h
118 .. kernel-doc:: include/asm-generic/div64.h
121 .. kernel-doc:: include/linux/math64.h
124 .. kernel-doc:: lib/div64.c
125 :functions: div_s64_rem div64_u64_rem div64_u64 div64_s64
127 .. kernel-doc:: lib/gcd.c
133 .. kernel-doc:: lib/sort.c
136 .. kernel-doc:: lib/list_sort.c
142 .. kernel-doc:: lib/uuid.c
145 Memory Management in Linux
146 ==========================
151 .. kernel-doc:: include/linux/slab.h
154 .. kernel-doc:: mm/slab.c
157 .. kernel-doc:: mm/util.c
160 User Space Memory Access
161 ------------------------
163 .. kernel-doc:: arch/x86/include/asm/uaccess.h
166 .. kernel-doc:: arch/x86/lib/usercopy_32.c
169 More Memory Management Functions
170 --------------------------------
172 .. kernel-doc:: mm/readahead.c
175 .. kernel-doc:: mm/filemap.c
178 .. kernel-doc:: mm/memory.c
181 .. kernel-doc:: mm/vmalloc.c
184 .. kernel-doc:: mm/page_alloc.c
187 .. kernel-doc:: mm/mempool.c
190 .. kernel-doc:: mm/dmapool.c
193 .. kernel-doc:: mm/page-writeback.c
196 .. kernel-doc:: mm/truncate.c
199 Kernel IPC facilities
200 =====================
205 .. kernel-doc:: ipc/util.c
214 .. kernel-doc:: include/linux/kfifo.h
217 relay interface support
218 =======================
220 Relay interface support is designed to provide an efficient mechanism
221 for tools and facilities to relay large amounts of data from kernel
227 .. kernel-doc:: kernel/relay.c
230 .. kernel-doc:: kernel/relay.c
239 .. kernel-doc:: kernel/kmod.c
245 Refer to the file kernel/module.c for more information.
253 .. kernel-doc:: kernel/irq/manage.c
259 .. kernel-doc:: kernel/dma.c
265 .. kernel-doc:: kernel/resource.c
268 .. kernel-doc:: kernel/resource.c
274 .. kernel-doc:: arch/x86/kernel/cpu/mtrr/main.c
280 .. kernel-doc:: security/security.c
283 .. kernel-doc:: security/inode.c
289 .. kernel-doc:: kernel/audit.c
292 .. kernel-doc:: kernel/auditsc.c
295 .. kernel-doc:: kernel/auditfilter.c
301 .. kernel-doc:: kernel/acct.c
307 .. kernel-doc:: block/blk-core.c
310 .. kernel-doc:: block/blk-core.c
313 .. kernel-doc:: block/blk-map.c
316 .. kernel-doc:: block/blk-sysfs.c
319 .. kernel-doc:: block/blk-settings.c
322 .. kernel-doc:: block/blk-exec.c
325 .. kernel-doc:: block/blk-flush.c
328 .. kernel-doc:: block/blk-lib.c
331 .. kernel-doc:: block/blk-tag.c
334 .. kernel-doc:: block/blk-tag.c
337 .. kernel-doc:: block/blk-integrity.c
340 .. kernel-doc:: kernel/trace/blktrace.c
343 .. kernel-doc:: block/genhd.c
346 .. kernel-doc:: block/genhd.c
352 .. kernel-doc:: fs/char_dev.c
358 The clock framework defines programming interfaces to support software
359 management of the system clock tree. This framework is widely used with
360 System-On-Chip (SOC) platforms to support power management and various
361 devices which may need custom clock rates. Note that these "clocks"
362 don't relate to timekeeping or real time clocks (RTCs), each of which
363 have separate frameworks. These :c:type:`struct clk <clk>`
364 instances may be used to manage for example a 96 MHz signal that is used
365 to shift bits into and out of peripherals or busses, or otherwise
366 trigger synchronous state machine transitions in system hardware.
368 Power management is supported by explicit software clock gating: unused
369 clocks are disabled, so the system doesn't waste power changing the
370 state of transistors that aren't in active use. On some systems this may
371 be backed by hardware clock gating, where clocks are gated without being
372 disabled in software. Sections of chips that are powered but not clocked
373 may be able to retain their last state. This low power state is often
374 called a *retention mode*. This mode still incurs leakage currents,
375 especially with finer circuit geometries, but for CMOS circuits power is
376 mostly used by clocked state changes.
378 Power-aware drivers only enable their clocks when the device they manage
379 is in active use. Also, system sleep states often differ according to
380 which clock domains are active: while a "standby" state may allow wakeup
381 from several active domains, a "mem" (suspend-to-RAM) state may require
382 a more wholesale shutdown of clocks derived from higher speed PLLs and
383 oscillators, limiting the number of possible wakeup event sources. A
384 driver's suspend method may need to be aware of system-specific clock
385 constraints on the target sleep state.
387 Some platforms support programmable clock generators. These can be used
388 by external chips of various kinds, such as other CPUs, multimedia
389 codecs, and devices with strict requirements for interface clocking.
391 .. kernel-doc:: include/linux/clk.h
394 Synchronization Primitives
395 ==========================
397 Read-Copy Update (RCU)
398 ----------------------
400 .. kernel-doc:: include/linux/rcupdate.h
402 .. kernel-doc:: include/linux/rcupdate_wait.h
404 .. kernel-doc:: include/linux/rcutree.h
406 .. kernel-doc:: kernel/rcu/tree.c
408 .. kernel-doc:: kernel/rcu/tree_plugin.h
410 .. kernel-doc:: kernel/rcu/tree_exp.h
412 .. kernel-doc:: kernel/rcu/update.c
414 .. kernel-doc:: include/linux/srcu.h
416 .. kernel-doc:: kernel/rcu/srcutree.c
418 .. kernel-doc:: include/linux/rculist_bl.h
420 .. kernel-doc:: include/linux/rculist.h
422 .. kernel-doc:: include/linux/rculist_nulls.h
424 .. kernel-doc:: include/linux/rcu_sync.h
426 .. kernel-doc:: kernel/rcu/sync.c