Skip to content

Commit

Permalink
Note that sys/systm.h is special too
Browse files Browse the repository at this point in the history
If you need / want to includerd sys/systm.h, it has to be just after
param.h/types.h. Document this existing practice. Not all kernel files
include systm.h, but when you do, it should be done out of order.

Reviewed by: vangyzen, kib, emaste
Differential Review: https://reviews.freebsd.org/D26981
  • Loading branch information
bsdimp authored and Andrew Turner committed Nov 5, 2020
2 parents 35efeef + 1040a21 commit b66e1f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion share/man/man9/style.9
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.\" From: @(#)style 1.14 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
.Dd July 16, 2020
.Dd October 28, 2020
.Dt STYLE 9
.Os
.Sh NAME
Expand Down Expand Up @@ -156,9 +156,13 @@ includes
.In sys/types.h ;
do not include both.
.Pc
Next, include
.In sys/systm.h ,
if needed.
The remaining kernel headers should be sorted alphabetically.
.Bd -literal
#include <sys/types.h> /* Non-local includes in angle brackets. */
#include <sys/systm.h>
#include <sys/endian.h>
#include <sys/lock.h>
#include <sys/queue.h>
Expand Down

0 comments on commit b66e1f6

Please sign in to comment.