Specifications

Understanding the Kernel Environmen
t
9-3
/usr/include/sys directories contain the system header files that contain the defini-
tions of the structures used by device drivers.
System Data Structures 9
This section examines the system data structures that are used by all device drivers. Many
of these are set up and maintained by the kernel itself. They are often passed as arguments
to your device driver routines and can provide information needed by your driver. This
section also describes the data types and header files that are used by device drivers.
Data Types 9
The data structures used by the kernel and device drivers are all built from a group of sim-
ple data types. These are outlined in Table 9-1. Note that most of these data types are
aligned on specific boundaries in memory by the C compiler. This is due to Series 6000
architectural requirements (a word boundary is every 2 bytes; a longword boundary is
every 4 bytes).
Table 9-1. System Data Types
Type Size Purpose Alignment
udbl_t
8
floating-point double-precision value
(MINDOUBLE to MAXDOUBLE,
as defined in values.h)
doubleword
int
4
integer value
(–2
31
to 2
31
–1)
longword
unsigned
4
positive integer
(0 to 2
32
–1)
longword
short
2
short integer value
(–2
15
to 2
15
–1)
word
unsigned
short
2
short integer value
(0 to 2
16
–1)
word
char
1
character value
(–128 to 127)
byte
unsigned char
1
character (0 to 255)
byte
pointer
4
address of an object
longword
caddr_t
4
character pointer
longword