Lines Matching +full:a +full:- +full:9
2 .\" SPDX-License-Identifier: BSD-2-Clause
23 In some cases, it is also a source of truth for the implementation details
24 and/or design decisions behind a particular subsystem or piece of code.
28 It is written assuming a certain familiarity with common programming or
29 OS-level concepts and practices.
31 information that readers approaching a particular subsystem or interface for
35 source code itself, is forever a work-in-progress.
38 This documentation is a supplement to the source code, and can not always be
41 At its best, section 9 documentation will provide a description of a particular
47 describe types, global variables, macros, or high-level concepts.
53 .Xr style 9
54 for a detailed set of rules and guidelines.
58 There are implementations for many well-known data structures available in the
60 .Bl -tag -width "Xr bitstring 3"
63 .It Xr counter 9
64 An SMP-safe general-purpose counter implementation.
65 .It Xr hash 9
67 .It Xr nv 9
70 Singly-linked and doubly-linked lists, and queues.
71 .It Xr refcount 9
72 An SMP-safe implementation of reference counts.
73 .It Xr sbuf 9
75 .It Xr sglist 9
76 A scatter/gather list implementation.
84 sub-sections below.
87 .Xr printf 9 .
89 Endian-swapping functions:
90 .Xr byteorder 9 .
93 .Xr hexdump 9 .
95 A rich set of macros for declaring
98 .Xr sysctl 9 .
100 Non-recoverable errors in the kernel should trigger a
101 .Xr panic 9 .
102 Run-time assertions can be verified using the
103 .Xr KASSERT 9
105 Compile-time assertions should use
109 executed during start-up and shutdown; see
110 .Xr SYSINIT 9 .
113 .Xr gone_in 9 .
115 A unit number facility is provided by
116 .Xr unr 9 .
119 .Xr locking 9
124 .Xr atomic 9 .
127 .Xr epoch 9
129 .Xr smr 9
130 facilities are used to create lock-free data structures.
132 .Xr seqc 9 .
135 .Xr malloc 9 .
137 .Xr uma 9 .
139 .\" MHTODO: It would be useful to have a vm_page(9) or similar
140 .\" high-level page which points to the following contents instead.
145 .Bd -ragged -offset indent
146 .Xr vm_page_advise 9 ,
147 .Xr vm_page_alloc 9 ,
148 .Xr vm_page_bits 9 ,
149 .Xr vm_page_aflag 9 ,
150 .Xr vm_page_alloc 9 ,
151 .Xr vm_page_bits 9 ,
152 .Xr vm_page_busy 9 ,
153 .Xr vm_page_deactivate 9 ,
154 .Xr vm_page_free 9 ,
155 .Xr vm_page_grab 9 ,
156 .Xr vm_page_insert 9 ,
157 .Xr vm_page_lookup 9 ,
158 .Xr vm_page_rename 9 ,
159 .Xr vm_page_sbusy 9 ,
160 .Xr vm_page_wire 9
164 .Xr vm_map 9
167 The machine-dependent portion of the virtual memory stack is the
168 .Xr pmap 9
172 .Xr domainset 9
176 .Xr VFS 9 .
178 .Xr vfsconf 9 .
181 .Xr vnode 9
182 is the abstract and filesystem-independent representation of a file,
183 directory, or other file-like entity within the kernel.
186 .Xr acl 9 .
188 .Xr vaccess 9 .
192 .\" .Xr buf 9
195 .Xr bio 9
199 .Xr disk 9
203 .Xr devstat 9
207 .Xr mbuf 9 ,
208 a flexible memory management unit commonly used to store network packets.
211 .Xr ifnet 9
214 A framework for managing packet output queues is described by
215 .Xr altq 9 .
218 .Xr netisr 9 .
221 .Xr VNET 9 .
223 The front-end for interfacing with network sockets from within the kernel is
225 .Xr socket 9 .
226 The back-end interface for socket implementations is
227 .Xr domain 9 .
229 The low-level packet filter interface is described by
230 .Xr pfil 9 .
233 .Xr bpf 9
234 interface provides a mechanism to redirect packets to userspace.
237 .Xr ieee80211 9 .
239 A framework for modular TCP implementations is described by
240 .Xr tcp_functions 9 .
242 A framework for modular congestion control algorithms is described by
243 .Xr mod_cc 9 .
245 .\" TODO: a bus(9) or newbus(9) page, as well as updates to existing pages
246 .\" would be helpful in laying out the high-level concepts of FreeBSD's device
249 .Xr device 9
251 .Xr driver 9
254 Most drivers act as devices, and provide a set of methods implementing the
257 .Xr DEVICE_PROBE 9 ,
258 .Xr DEVICE_ATTACH 9 ,
260 .Xr DEVICE_DETACH 9 .
265 .Xr BUS_ADD_CHILD 9 ,
266 .Xr BUS_READ_IVAR 9 ,
268 .Xr BUS_RESCAN 9 .
272 .Xr rman 9
275 Drivers can request and manage their resources (e.g. memory-space or IRQ
277 .Bd -ragged -offset indent
278 .Xr bus_alloc_resource 9 ,
279 .Xr bus_adjust_resource 9 ,
280 .Xr bus_get_resource 9 ,
281 .Xr bus_map_resource 9 ,
282 .Xr bus_release_resource 9 ,
283 .Xr bus_set_resource 9
287 .Xr busdma 9
291 .Xr bus_space 9 .
294 .Xr hz 9 .
296 A few global time variables, such as system up-time, are described by
297 .Xr time 9 .
300 .Xr get_cyclecount 9 .
307 .Xr uiomove 9
312 .Xr casuword 9 ,
313 .Xr copy 9 ,
314 .Xr fetch 9 ,
316 .Xr store 9 .
319 .Xr kthread 9
321 .Xr kproc 9
325 .Xr taskqueue 9
328 For low-latency callback handling, the
329 .Xr callout 9
332 Dynamic handlers for pre-defined event hooks are registered and invoked using
334 .Xr EVENTHANDLER 9
337 The machine-independent interface to a context switch is
338 .Xr mi_switch 9 .
340 To prevent preemption, use a
341 .Xr critical 9
345 .Xr kern_yield 9 .
347 The various functions which will deliberately put a thread to sleep are
349 .Xr sleep 9 .
350 Sleeping threads are removed from the scheduler and placed on a
351 .Xr sleepqueue 9 .
355 .\".Xr scheduler 9 .
357 To locate a process or process group by its identifier, use
358 .Xr pfind 9
360 .Xr pgfind 9 .
362 .Xr pget 9
365 The "hold count" of a process can be manipulated with
366 .Xr PHOLD 9 .
369 .Xr signal 9 .
373 .Xr psignal 9 .
381 .Xr ucred 9
384 .Xr priv 9
390 .Xr securelevel_gt 9
392 .Xr securelevel_ge 9
395 The Mandatory Access Control (MAC) framework provides a wide set of hooks,
396 supporting dynamically-registered security modules;
398 .Xr mac 9 .
403 .Xr crypto 9 .
406 .Xr random 9
408 .Xr prng 9 .
411 .Xr module 9 .
413 .Xr intr_event 9
414 describes the machine-independent portion of the interrupt framework
418 .Xr swi 9 .
421 .Xr bus_setup_intr 9
424 A kernel test framework:
425 .Xr kern_testfrwk 9
427 A facility for defining configurable fail points is described by
428 .Xr fail 9 .
433 .Xr DB_COMMAND 9
440 .Xr ktr 9 .
443 .Xr SDT 9
447 .Xr stack 9
450 Kernel sanitizers can perform additional compiler-assisted checks against
452 These runtimes are capable of detecting difficult-to-identify classes of bugs,
453 at the cost of a large overhead.
455 .Xr KASAN 9
457 .Xr KMSAN 9
461 .Xr LOCK_PROFILING 9
466 .Bl -tag -width "Xr usbdi 9"
467 .It Xr iflib 9
471 .It Xr pci 9
473 .It Xr pwmbus 9
474 Pulse-Width Modulation (PWM) bus interface methods.
475 .It Xr usbdi 9
477 .It Xr superio 9
481 Dynamic per-CPU variables:
482 .Xr dpcpu 9 .
485 .Xr cpuset 9 .
488 .Xr getenv 9 .
490 Contexts for CPU floating-point registers are managed by the
491 .Xr fpu_kern 9
495 .Xr reboot 9 .
497 A facility for asynchronous logging to files from within the kernel is provided
499 .Xr alq 9 .
502 .Xr osd 9
503 framework provides a mechanism to dynamically extend core structures in a way
506 .Xr hhook 9
508 .Xr khelp 9
512 .Xr kobj 9 .
515 .Xr style 9
518 .%U https://docs.freebsd.org/en/books/arch-handbook/