The header file directory contains a total of 32. h header files. There are 13 main directories, 4 sub-directories in ASM, 10 sub-directories in Linux, and 5 sub-Directories In sys. The respective functions of these header files are as follows. For specific functions and information, see Chapter 14th.
<A. Out. h>: the header file a. Out defines the format of the. out execution file and some macros.
<Const. h>: constant symbol header file. Currently, only the flag spaces of the I _mode field in the I node are defined.
<Ctype. h>: character type header file, which defines macros for character type judgment and conversion.
<Errno. h>: header file of the error code, which contains various error numbers in the system. (Linus introduced from minix ).
<Fcntl. h>: The file control header file, used to define the operation control constant symbol of the file and Its descriptor.
<Signal. h>: the signal header file, which defines the signal symbol constant, signal structure, and signal operation function prototype.
<Stdarg. h>: Standard parameter header file, which defines the variable parameter list in macro form. It mainly describes a type (va_list) and three macros (va_start, va_arg, and va_end) for vsprintf, vprintf, and vfprintf functions.
<Stddef. h>: standard definition header file, defining null, offsetof (type, member ).
<String. h>: the string header file mainly defines some embedding functions related to string operations.
<Termios. h>: the header file of the input and output functions of the terminal. It mainly defines the terminal interface for controlling the asynchronous communication port.
<Time. h>: The time header file mainly defines the TM structure and the prototype of some time-related functions.
<Unistd. h>: Linux Standard header file, which defines various symbol constants and types and declares various functions. For example, if _ Library __is defined, the system call number and Embedded Assembly _ syscall0 () are also included.
<Utime. h>: the user's time header file defines the access and modification time structure and the utime () prototype.
(1) System Structure-related header file subdirectory Include/ASM
These header files mainly define some data structures, macro functions, and variables closely related to the CPU architecture. 4 files in total.
<ASM/IO. h>: I/O header file, which defines the function for I/O port operations in the form of macro Embedded Assembler.
<ASM/memory. h>: the memory copy header file, which contains memcpy () Embedded Assembly macro functions.
<ASM/segment. h>: Segment operation header file, which defines Embedded Assembler functions related to segment register operations.
<ASM/system. h>: System header file, which defines Embedded Assembly macros for setting or modifying descriptors/interrupt doors.
(2) Linux kernel-specific header file subdirectory Include/Linux
<Linux/config. h>: The Kernel configuration header file that defines the keyboard language and hard disk type (hd_type) options.
<Linux/fdreg. h>: floppy disk header file, which contains some definitions of the floppy disk controller parameters.
<Linux/fs. h>: File System header file, which defines the file table structure (such as file, buffer_head, and m_inode ).
<Linux/hdreg. h>: the hard disk parameter header file that defines information such as the port used to access the hard disk register, status code, and partition table.
<Linux/head. h>: Head header file, which defines the simple structure of the segment descriptor and several selector constants.
<Linux/kernel. h>: kernel header file, which contains the original definition of common kernel functions.
<Linux/mm. h>: Memory Management header file, which contains page size definitions and some page release function prototypes.
<Linux/sched. h>: The scheduler header file defines the task structure task_struct and initial task 0 data,
And some macro statements related to descriptor parameter settings and obtaining of Embedded Assembler functions.
<Linux/sys. h>: System Call header file, which contains 72 system call C function handlers starting with "sys.
<Linux/tty. h>: the TTY header file defines parameters and constants related to tty_io and serial communication.
(3) system-specific data structure subdirectory Include/sys
<Sys/STAT. h>: The File status header file, which contains the file or file system status structure stat {} and constants.
<Sys/times. h>: defines the running time structure of the process. TMS and the prototype of the Times () function.
<Sys/types. h>: Type header file, which defines the basic system data type.
<Sys/utsname. h>: system name structure header file.
<Sys/Wait. H>: wait for the call header file to define the system call wait () and waitpid () and related constant symbols.